Sure. You can make that optional like this :
Route::get('category/{id}/{date?}', ...);
Then in your method :
public function index($id, $date = null)
{
if( is_null($date) ) $date = date('y-m-j');
// ... normal stuff !
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community