Я пытаюсь получить доступ к моему URL адресу:Laravel контроллер RESTful маршрутизации
www.mysite.com/user/dash/sales
у меня в каталоге контроллеров, DashboardController. PHP файл:
<?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');
}
}
Я пробовал все следующие возможности в моем файле routes.php не повезло:
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');
});
Есть ли у кого-нибудь другие предложения? Я не совсем уверен, как сделать этот успешный маршрут. Сообщение об ошибке, которое я получаю со всеми этими маршрутами, таково:
Метод контроллера не найден.
Upvoted хотя ссылка сломана – kJamesy
@kJamesy Вот ссылка из архива, http://web.archive.org/web/20130912011338/ http://laravel.io/topic/30/routes-first-in-first-out – Stranger