Reputation: 3422
Named routes, the best thing that's created by Laravel. But is it's possible in some way to add an array of named routes which can be used?
I did the follow:
Route::get('/', [
'as' => ['url', 'secondurl'],
'uses' => 'ViewController@index'
]);
but it returned an eror, Illegal offset type
.
Is this simply not possible or did I do something wrong?
Upvotes: 0
Views: 87
Reputation: 691
As far as I know, you can only set one name for each of the route. Check the documentations here.
Hope my answer helps =)
Upvotes: 2