本文整理汇总了PHP中item::all方法的典型用法代码示例。如果您正苦于以下问题:PHP item::all方法的具体用法?PHP item::all怎么用?PHP item::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item
的用法示例。
在下文中一共展示了item::all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
Route::get('login', array('as' => 'login', 'uses' => 'UsersController@login'))->before('guest');
Route::post('login', array('as' => 'login', 'uses' => 'UsersController@handleLogin'));
Route::get('/profile', array('as' => 'profile', 'uses' => 'UsersController@profile'))->before('auth');
Route::get('/logout', array('as' => 'logout', 'uses' => 'UsersController@logout'));
Route::get('documents', 'DocumentsController@index')->before('auth');
Route::get('okofs', 'OkofsController@index')->before('auth');
Route::get('organizations', 'OrganizationsController@all')->before('auth');
Route::get('/admin', ['as' => 'admin', 'uses' => 'AdminController@index'])->before('auth');
Route::get('test', function () {
if (($handle = fopen('file.csv', 'r')) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ',')) !== FALSE) {
$item = new Item();
$item->name = $data[0];
$item->save();
}
fclose($handle);
}
return item::all();
});
Route::get('reports_2015', function () {
return View::make('reports');
});
Route::group(array('before' => 'auth'), function () {
Route::controller('org', 'OrganizationsController');
Route::controller('documents', 'DocumentsController');
Route::controller('Items', 'ItemsController');
Route::controller('Okofs', 'OkofsController');
Route::controller('admin', 'AdminController');
Route::controller('organization', 'OrganizationsController');
Route::controller('oss', 'OssController');
});
示例2: showAll
public function showAll()
{
//
return view('admin.item.showAll')->with('item', item::all());
}