As I understand from the Laravel documentation, it's used for redirection, but maybe I'm wrong.
I wrote
Route::get('user/profile', ['as' => 'profile', function () {
echo 'some_text';
}]);
then I was expecting my URL to redirect from
https://base_url/public/index.php/user/profile
to https://base_url/public/index.php/profile
but it doesn't happen.
Overall, I want to know, what the difference is if I used
Route::get('user/profile', function () {
echo 'some_text';
});
instead of the above routing rule.