Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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', '.+');
  }
  ...
}
like image 249
Thomas E. Avatar asked Nov 07 '22 17:11

Thomas E.


1 Answers

Think there is no way to do this in Laravel 5.x

like image 65
Thomas E. Avatar answered Nov 14 '22 22:11

Thomas E.