How can I access route path for a named route in Laravel 5.5? As far as I've searched for this syntax, I haven't found such.
2 Answers
Name Route Path in Web.php
Route::get('/', 'ModelController@index')->name('model.index'); Route::get('/create', 'ModelController@create')->name('model.create'); Route::get('/edit/{paramerter}', 'ModelController@edit')->name('model.edit'); Accessing Route Path: route('model.index')
Passing Parameter: route('model.edit', ['parameter'=> $value])
1 Comment
ux.engineer
Thanks a lot! This was so simple that I missed it... Using syntax route('model.index') worked magic :)