RAUSHAN KUMAR
RAUSHAN KUMAR

Reputation: 6006

Laravel add dynamic parameter before route

I have a route like

http://localhost.fbleads.com/{dynamic-value}/auth/facebook-login

It give me error that route not found. Any solution for this

Upvotes: 1

Views: 246

Answers (1)

musicvicious
musicvicious

Reputation: 1093

In your routes you could maybe have something like:

Route::get('{dynamic-value}/auth/facebook-login', [
    'as' => 'auth.login',
    'uses' => 'AuthController@login'
]);

the {dynamic_value} can be anything and be accessible as parameter in your controller method

Upvotes: 2

Related Questions