jeudi 4 février 2016

Laravel Form Submission after Authentication

I was developing a form which is public but user must be logged in to submit the form. Here is my routes:

Route::get('exmpleForm', ['as' => 'exmpleForm', 'uses' => 'ExmpleFormController@create']);

/* Routes for form submission. */
Route::group([
    'middleware' => ['auth', 'role:user']
], function() {
    Route::post('exmpleForm', ['as' => 'exmpleForm.store', 'uses' => 'ExmpleFormController@store']);
});

What's happening now-

After form submission, user redirects to login page (as he is not authenticated) and after login, again redirects to form page without submitting.

What I need-

I need to keep the form request alive so that after login, the form will be submitted. How to achieve this?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1PCwo6z
via IFTTT

Aucun commentaire:

Enregistrer un commentaire