Hesto / multi-auth

Laravel 5.3, 5.4, 5.5, 5.6, 5.7 multi auth package
MIT License
448 stars 146 forks source link

[ErrorException] Undefined offset: 0 #99

Open rifaldhiaw opened 7 years ago

rifaldhiaw commented 7 years ago

Hey Hesto. I just try out your multi-auth on latest laravel 5.5 and just after I execute this:

php artisan multi-auth:install {singular_lowercase_name_of_guard} -f

then, i want to do migration, that error showed up. After I clean all of changed file, it back to normal. I can't figure out which part is wrong. Can you help me?

iccunha commented 7 years ago

I just had the same problem, here's the solution: go to RouteServiceProvider and add the function protected function map {Guard} Routes ()      { Route::group([ 'middleware' => ['web', '{guard}', 'auth:{guard}'], 'prefix' => '{guard}', 'as' => '{guard}.', 'namespace' => $this->namespace, ], function ($router) { require base_path('routes/{guard}.php'); });      }

replace {Guard} with your name

0x4r45h commented 6 years ago

@iccunha thx a lot,worked for me. btw whats the problem ? i used multi auth about 2weeks ago without any problem,but now in my new project encountered this

dhsananias commented 6 years ago

@iccunha this does not work in Laravel 5.6 ... Any suggestions?