Do You set the right Path in the config.php?
Sorry. I mean the app.php. There is a array Key URL....
yes, this i set to: 'url' => 'http://localhost/mylaravel'
In advice of jarektkaczyk, I grouped my resources in routes.php
Route::group(array('prefix' => 'phptodomanager'), function() {
// Controllers
Route::resource ('priorities', 'PrioritiesController');
Route::resource ('projects', 'ProjectsController');
Route::resource ('status', 'StatusController');
Route::resource ('todos', 'TodosController');
});
When i use <?php echo route ('phptodomanager.priorities.index'); ?> it generates a correct url with the prefix.
But if I open the link, it leads me to RouteCollection.php --> NotFoundHttpException
Learned that group for resources dont work, so I produced them:
Route::resource ('phptodomanager/priorities', 'PrioritiesController');
Route::resource ('phptodomanager/projects', 'ProjectsController');
Route::resource ('phptodomanager/status', 'StatusController');
Route::resource ('phptodomanager/todos', 'TodosController');
But with route('phptodomanager.priorities.index'); still getting NotFoundHttpException
try not using resources routing
Route::group(array('prefix' => 'phptodomanager'), function() {
// Controllers
Route::get ('/priorities', array('uses'=>'PrioritiesController@yourMethod');
});
and see what's the diffrent
i tried it with
Route::group(array('prefix' => 'phptodomanager'), function() {
// Controllers
Route::get ('/priorities', array('as' => 'priorities', 'uses' => 'PrioritiesController@index'));
});
remains the same result, correct url but NotFoundHttpException
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community