Thank you for responding :).
I've yet to reach the episode discussing middleware so I'm not sure if I fully understand you. My route.php file however is free of anything I didn't add myself.
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', 'HomeController@index');
// Static routes for static pages
Route::get('about', 'StaticPageController@about');
Route::get('bootleg', 'StaticPageController@bootleg');
//Registration routes
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
//Authentication routes
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');*/
//All of the color REST routes, except delete?
Route::resource('colors', 'ColorsController');
Route::get('colors/{name}/delete', 'ColorsController@delete');
//All of the plushy REST routes, except delete?
Route::resource('plushies', 'PlushiesController');
Route::get('/home', 'HomeController@index');
If I run php artisan route:list I do get the following which contains quite a few more routes then I thought I had and the last column does have two different types of middleware for both App\Http\Controllers\Auth\AuthController and App\Http\Controllers\Auth\PasswordController.
+--------+--------------------------------+--------------------------------------------------------+------------------+------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+--------------------------------+--------------------------------------------------------+------------------+------------------------------------------------------------+------------+
| | GET|HEAD | / | | App\Http\Controllers\HomeController@index | web |
| | GET|HEAD | about | | App\Http\Controllers\StaticPageController@about | web |
| | GET|HEAD | auth/login/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\AuthController@getLogin | web,guest |
| | POST | auth/login/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\AuthController@postLogin | web,guest |
| | GET|HEAD | auth/logout/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\AuthController@getLogout | web,guest |
| | POST | auth/register/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\AuthController@postRegister | web,guest |
| | GET|HEAD | auth/register/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\AuthController@getRegister | web,guest |
| | GET|HEAD|POST|PUT|PATCH|DELETE | auth/{_missing} | | App\Http\Controllers\Auth\AuthController@missingMethod | web,guest |
| | GET|HEAD | bootleg | | App\Http\Controllers\StaticPageController@bootleg | web |
| | POST | colors | colors.store | App\Http\Controllers\ColorsController@store | web |
| | GET|HEAD | colors | colors.index | App\Http\Controllers\ColorsController@index | web |
| | GET|HEAD | colors/create | colors.create | App\Http\Controllers\ColorsController@create | web |
| | GET|HEAD | colors/{colors} | colors.show | App\Http\Controllers\ColorsController@show | web |
| | DELETE | colors/{colors} | colors.destroy | App\Http\Controllers\ColorsController@destroy | web |
| | PUT|PATCH | colors/{colors} | colors.update | App\Http\Controllers\ColorsController@update | web |
| | GET|HEAD | colors/{colors}/edit | colors.edit | App\Http\Controllers\ColorsController@edit | web |
| | GET|HEAD | colors/{name}/delete | | App\Http\Controllers\ColorsController@delete | web |
| | GET|HEAD | home | | App\Http\Controllers\HomeController@index | web |
| | GET|HEAD | password/broker/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\PasswordController@getBroker | web,guest |
| | GET|HEAD | password/email/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\PasswordController@getEmail | web,guest |
| | POST | password/email/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\PasswordController@postEmail | web,guest |
| | GET|HEAD | password/reset/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\PasswordController@getReset | web,guest |
| | POST | password/reset/{one?}/{two?}/{three?}/{four?}/{five?} | | App\Http\Controllers\Auth\PasswordController@postReset | web,guest |
| | GET|HEAD|POST|PUT|PATCH|DELETE | password/{_missing} | | App\Http\Controllers\Auth\PasswordController@missingMethod | web,guest |
| | POST | plushies | plushies.store | App\Http\Controllers\PlushiesController@store | web |
| | GET|HEAD | plushies | plushies.index | App\Http\Controllers\PlushiesController@index | web |
| | GET|HEAD | plushies/create | plushies.create | App\Http\Controllers\PlushiesController@create | web |
| | DELETE | plushies/{plushies} | plushies.destroy | App\Http\Controllers\PlushiesController@destroy | web |
| | PUT|PATCH | plushies/{plushies} | plushies.update | App\Http\Controllers\PlushiesController@update | web |
| | GET|HEAD | plushies/{plushies} | plushies.show | App\Http\Controllers\PlushiesController@show | web |
| | GET|HEAD | plushies/{plushies}/edit | plushies.edit | App\Http\Controllers\PlushiesController@edit | web |
+--------+--------------------------------+--------------------------------------------------------+------------------+------------------------------------------------------------+------------+
You're saying I should remove the web middleware, but it's not in my my own routes.php list so I'm not sure how to approach this.
[edit]
In AuthController and PasswordController I have disabled the middleware reference $this->middleware('guest'); in their constructors. If I run php artisan route:list everything only has 'web' in the middleware column. So it's at least all in the same middleware now, but that was the one you asked me to disable - I still have no idea how.
I guess it has to be the 'web' middleware that has to disable then, but how.
[edit 2]
I found that App\Http\Providers\RouteServiceProvider sets the web middleware
protected function mapWebRoutes(Router $router)
{
$router->group([
'namespace' => $this->namespace, 'middleware' => 'web',
], function ($router) {
require app_path('Http/routes.php');
});
}
Removing the 'middleware' => 'web' tidbit makes my views spit out errors because they no longer have an $errors variable. Removing all references to $errors from my views and trying to login just gives me the same problem. I can register an account, but I can't log in with one.
[edit3]
download link for all code in case anyone wants to dive in.