I am trying to create a prefix with a variable for "companies" to enter the platform. All users are tied to the company, so the usual /login not needed. I would like to use something like `/ acme-company-name / login
I use Laravel auth by default via: php artisan make:auth on a new installation.
Route::group(['prefix' => '{company}'], function () { Auth::routes(); });
When I try to switch to /company-name/login , I see the following error:
Missing required parameters for [Route: login] [URI: {company}/login].
Inside the automatically generated login.blade.php I see a call to the route('login') function, and it looks like where everything breaks down. I think I need to somehow provide a variable for this function, or redefine which โentryโ route at some point? I would prefer not to replace the call to Auth::routes() , but I will definitely do it if necessary to fix this problem.
I should note that I tried to define the group 'as' => 'company' and change the route('company.login') , but then I was told that the company.login route was not defined.
source share