I am trying to access my url:
www.mysite.com/user/dash/sales
There is a DashboardController.php file in my controller directory:
<?php class DashboardController extends BaseController { public function __construct() { $this->beforeFilter('auth'); } public function getSupplier() { $this->layout->content = View::make('user.dashboard.supplier'); } public function getSales() { $this->layout->content = View::make('user.dashboard.sales'); } public function getAdmin() { $this->layout->content = View::make('user.dashboard.admin'); } }
I tried all of the following features in the routes.php file with no luck:
Route::any('user/dash/(:any)', array('uses' => 'DashboardController') ); Route::controller( 'user/dash', 'DashboardController' ); Route::group(array('prefix' => 'user', 'before' => 'auth'), function() { Route::controller('dash', 'DashboardController'); });
Does anyone have any other suggestions? I am not quite sure how to make this successful route. The error message I get with all of these routes is the following:
Controller method not found.
source share