jeudi 28 janvier 2016

Laravel: End URL in directory rather than page

I'm just beginning to learn laravel and am struggling to get my URL to end in a directory rather than at a page. Basically, I want to force the url to be

baseurl.com/forum/

but no matter what I do, it always reverts back to

baseurl.com/forum

This is an issue when the user clicks a category, it then replaces the forum with the category name, rather than drilling farther down into the forums section. This is what my routes file looks like:

Route::group(['prefix' => 'forum', 'namespace' => 'Forum'], function(){
    Route::get('/', 'ForumController@index');
});

Do I need to create another empty group within the first one in order to enter a new subdirectory? I also don't want the /forum to be a valid page, only the /forum/ should be valid, and should be the forum's index method.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire