vendredi 1 septembre 2017

Can I use domain AND port in a routing group in Laravel?

Is there any way to bind routes to an port? I am using Laravel 5.5

Route::domain('example.org:8080')->group(function() {... some routes ...})
Route::domain('example.org')->group(function() {... other routes ...})

I already tried to use a route pattern in the RouteServiceProvider. But it only allows me to route by the complete domain.

class RouteServiceProvider extends ServiceProvider
{
  ...
  public function boot()
  {
    // allow complete domains
    \Route::pattern('domain', '.+');
  }
  ...
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire