lundi 30 décembre 2019

How to make multi-level routes - Laravel

I try to make route like

  1. Post URL
    domain/{...dynamic-category...}/post-slug
    with {...dynamic-category...} like sub-cate/sub1-cate...

=> My route: Route::get('/{cate}/{post}', ['as' => 'post', 'uses' => 'PostController@index'] );
  1. Category Paging
    domain/{...dynamic-category...}/page/{page-number}

=> My route: Route::get('/{cate}/page/{page-number}', ['as' => 'cate', 'uses' => 'CateController@index'] );

But my route is a simple level. How to do that thank.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire