bitfumes / laravel-multiauth

Multi Auth and admin auth in Laravel Project
MIT License
470 stars 105 forks source link

multiauth:make {guard} on laravel 8 not working #134

Closed atomos1 closed 3 years ago

atomos1 commented 4 years ago

On Laravel 8.10.0 when I try to create a new auth I get this error.

php artisan multiauth:make teacher

Step 1. Teacher Guard is added to config/auth.php file

Step 2. New Controllers for Teacher is added to App\Http\Controller{Teacher}

Step 3. Routes for teacher is added to routes/teacher.php file

ErrorException

Undefined offset: 0

at vendor/bitfumes/laravel-multiauth/src/Console/Commands/MakeMultiAuthCommand.php:184 180▕ return; 181▕ } 182▕ 183▕ preg_match('/\s+\/**\n\s+*\s(\w+\s)+"web"\s(\w+\s)+\w+.\n/', $provider, $match); ➜ 184▕ $provider = str_replace($match[0], $map . $match[0], $provider); 185▕ /** Function Call **/ 186▕ 187▕ $map_call = file_get_contents($this->stub_path . '/routes/map_call.stub'); 188▕

  +16 vendor frames 

17 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

sarthaksavvy commented 3 years ago

Fixed with new release, please update the packege