Support the ongoing development of Laravel.io →
Authentication Session Forms
Last updated 2 years ago.
0

have a look at the traits that are being used (more specifically at the redirect part)

btw: does your tweaking works? i.e. can you login/register etc and the issue is just redirection?

0

shez1983 said:

have a look at the traits that are being used (more specifically at the redirect part)

btw: does your tweaking works? i.e. can you login/register etc and the issue is just redirection?

Everything works flawlessly (both registering & logging in), except for the redirects. I haven't modified the RedirectIfAuthenticated (guest) middleware, so it should work as intended. I'm pasting my whole routes file just in case.

Route::get('/', 'HomePageController@index');

// DASHBOARD //
Route::group([
	'prefix' => 'dashboard', 
	'namespace' => 'Dashboard', 
	'middleware' => ['auth', 'roles'],
	'roles' => ['administrator', 'manager']
	], function() {

    Route::get('/', 'DashboardController@index'); 
});

// ADMIN //
Route::group([
	'prefix' => 'admin', 
	'namespace' => 'Admin', 
	'middleware' => ['auth', 'roles'],
	'roles' => ['administrator', 'manager']
	], function() {

    Route::get('/', 'AdminHomeController@index');
    Route::resource('competition', 'AdminController'); 
});

Route::controllers([
	'forgot' => 'Auth\PasswordController',
	'/' => 'Auth\AuthController',
]);
0

Sign in to participate in this thread!

Eventy

Your banner here too?

MarkkusM markkusm Joined 7 Jun 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.