O
O
ortsuev332019-08-13 15:55:57
Laravel
ortsuev33, 2019-08-13 15:55:57

How to set site name in helper route function?

How to set site name in helper route function?
I know that it is possible to write simply

Route::get('/', '[email protected]')->name('home');

well is there a way to use route('home') otherwise for a website ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jazzus, 2019-08-13
@ortsuev33

Name is needed for routes where the url can change. For / not relevant. In controllers, you can send the url to the main one, you can receive it through or register it in the env / app config to receive
config('app.url')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question