I'm trying to access my URL at:
www.mysite.com/user/dash/sales
I have in my controllers directory, a DashboardController.php file:
<?php
class DashboardController extends BaseController {
public function __construct() {
$this->beforeFilter('auth');
}
/**
* Supplier's dashboard screen
*
*/
public function getSupplier()
{
$this->layout->content = View::make('user.dashboard.supplier');
}
/**
* Sales dashboard screen
*
*/
public function getSales()
{
$this->layout->content = View::make('user.dashboard.sales');
}
/**
* Admin's dashboard screen
*
*/
public function getAdmin()
{
$this->layout->content = View::make('user.dashboard.admin');
}
}
I've tried all the following possibilities in my 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'm not quite sure on how to make this a successful route. The error message I get with all those routes is this:
Controller method not found.