Closed PieOrCake closed 5 years ago
Hi @pieordie, can you please try something? Can you run php artisan route:list
after each of the steps and let me know at which point it breaks?
I imagine that it's caused by deleting the files at step 11., since the first line of the error says that RegisterController does not exist. I can try and test it soon if you need.
Hello, I've followed the tutorial too and I got another error after running php artisan route:list
:
ErrorException : include(C:\Users\sadm-m263733\Desktop\EasyPHP-Devserver-17\eds-www\btplan\vendor\composer/../../app
/Http/Controllers/Auth/RegisterController.php): failed to open stream: No such file or directory
at C:\Users\sadm-m263733\Desktop\EasyPHP-Devserver-17\eds-www\btplan\vendor\composer\ClassLoader.php:444
440| * Prevents access to $this/self from included files.
441| */
442| function includeFile($file)
443| {
> 444| include $file;
445| }
446|
Exception trace:
1 include()
C:\Users\sadm-m263733\Desktop\EasyPHP-Devserver-17\eds-www\btplan\vendor\composer\ClassLoader.php:444
2 Composer\Autoload\includeFile("C:\Users\sadm-m263733\Desktop\EasyPHP-Devserver-17\eds-www\btplan\vendor\composer/.
./../app/Http/Controllers/Auth/RegisterController.php")
C:\Users\sadm-m263733\Desktop\EasyPHP-Devserver-17\eds-www\btplan\vendor\composer\ClassLoader.php:322
Please use the argument -v to see more details.
Hmmm... I removed RegisterController.php
because we don't need registering users with this LDAP setup. I will look where we have to touch in order to remove this entry from the route list.
Not sure if this is still unresolved, but I have done something similar with the ADLDAP2 laravel module and I removed the extra routes that were used by Auth for registering and added my own to handle login/logout.
Hi @zack-hable , could you please be more specific about what you removed and added? This way I will try and update the instructions. Thank you!
in routes/web.php you need to remove
Auth::routes();
and add routes for the controllers/methods you plan on using to handle authentication. Below are the routes I am using, yours may differ, but Auth::routes() I think still includes references to the register controller which is no longer present since you deleted it.
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout');
Fixed in the last version of the tutorial. See https://stackoverflow.com/questions/42695917/laravel-5-4-disable-register-route for details.
The instructions work perfectly, but route:list no longer works. Error as follows:
$ php artisan route:list
ReflectionException : Class App\Http\Controllers\Auth\RegisterController does not exist
at C:\xampp\htdocs\smart\vendor\laravel\framework\src\Illuminate\Container\Container.php:767 763| if ($concrete instanceof Closure) { 764| return $concrete($this, $this->getLastParameterOverride()); 765| } 766|
Exception trace:
1 ReflectionClass::__construct("App\Http\Controllers\Auth\RegisterController") C:\xampp\htdocs\smart\vendor\laravel\framework\src\Illuminate\Container\Container.php:767
2 Illuminate\Container\Container::build("App\Http\Controllers\Auth\RegisterController") C:\xampp\htdocs\smart\vendor\laravel\framework\src\Illuminate\Container\Container.php:646
Please use the argument -v to see more details.