php - Laravel 4 Resource routing error -


i have route :

// work     route::resource('work', 'workcontroller');     route::get('work/{id}/delete', array('as' => 'admin.work.delete', 'uses' => 'workcontroller@confirmdestroy'))         ->where('id', '[0-9]+'); 

and controller workcontroller residing @ app/controllers/admin in view call this:

<a href="{{ route('admin.work.index') }}" class="btn btn-success btn-lg" role="button"><span class="glyphicon glyphicon-book"></span> <br/>work</a> 

and error:

error message: class app\controllers\admin\work not exist 

what wrong code? have used same approach pages, users , menus , worked.

can confirm name of controller file in app\controllers\admin?. route should

// work route::group(array('prefix' => 'admin', function() {      route::resource('work', 'workcontroller');     route::get('work/{id}/delete', array('as' => 'admin.work.delete', 'uses' => 'workcontroller@confirmdestroy'))     ->where('id', '[0-9]+'); }); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -