Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
No requieren subrutas para usar el parámetro de grupo de rutas

Digamos que tengo el siguiente código:

 Route::group(['domain' => '{tenant_domain}.myapp.com', 'middleware' => 'tenant'], function () { Route::get('/', function () { // send to dashboard/login based on auth if (Auth::check()) { return redirect()->route('dashboard'); } else { return redirect()->route('login'); } }); Route::group(['middleware' => 'guest'], function () { // login routes Route::get('login', 'Auth\LoginController@showLoginForm')->name('login'); Route::post('login', 'Auth\LoginController@login'); // password reset routes Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); Route::post('password/reset', 'Auth\ResetPasswordController@reset'); }); });

Ahora, el middleware de tenant utiliza el tenant_domain . Sin embargo, quiero que ninguna de las subrutas requieran el tenant_domain como parámetro en sus controladores.

¿Cómo hago esto?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!