Ejemplo n.º 1
0
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');
});
Ejemplo n.º 2
0
 public function showAll()
 {
     //
     return view('admin.item.showAll')->with('item', item::all());
 }