rappasoft / vault

Roles & Permissions for the Laravel 5 Framework
MIT License
103 stars 10 forks source link

[Question] If not logged in -> log in form #23

Open NeDetto opened 9 years ago

NeDetto commented 9 years ago

I have this example

Route::group([
    'middleware' => 'vault.routeNeedsRole',
    'role' => ['Administrator','Test1'], 
    'redirect' => 'not-autorized',
    'with' => ['error', 'You do not have access to do that.']
], function()
{
    Route::get('example', 'testController@test');
}

I want this : if user go to "site.com/example" and he is not logged in, show login form. After login, redirect to the resource requested by user site.com/example ---> loginform ----> site.com/example second example site.com/example/54/edit ---->loginform --->site.com/example/54/edit how we can do this?