lundi 26 août 2019

How fix redirecting with parameter have error

In my laravel 5.8 app when there are no data in session I need to redirect to some default control. I do

   return redirect()->route('admin.oauthAdminCallback/' . $form_action);

when in routes/web.php defined :

Route::group(['middleware' => ['auth', 'isVerified', 'CheckUserStatus'], 'prefix' => 'admin', 'as' => 'admin.'], function () {

    Route::get('oauthAdminCallback/{form_action}', [ 'uses' => 'Admin\EventsController@oauthAdminCallback']);//->name('oauthAdminCallback');

But I got error :

Route [admin.oauthAdminCallback/calendarActionUpdate] not defined.

If in first line $form_action has value : “calendarActionUpdate”. Which is correct way ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire