I had searched for how to add parameters to resource route
Route::resource('posts','PostsController');
// became
Route::resource('posts/category.post','PostsController');
now , by the category.post I can declare additional parameters to all resource routes
but they are required , my question is how to make them optional ?
I tried something like this
Route::resource('posts/category?.post','PostsController');
to make the category parameter be an optional one , but that didn't work with me .
how I can do so ?
thank you .