In my route I have like this
Route::get('/library/{id?}', 'LibraryController@index')->name('library');
and returning my url to http://localhost/dmb/library/2017
In my blade how can I check and display if I have that 2017 in my url?
In my route I have like this
Route::get('/library/{id?}', 'LibraryController@index')->name('library');
and returning my url to http://localhost/dmb/library/2017
In my blade how can I check and display if I have that 2017 in my url?
this code will help you
if you want to get library then you should used
$segment = Request::segment(1);
for 2017 then used segment(2)
$segment = Request::segment(2);