show the routes files ...
There is nothing wrong in the new version ?
There is nothing wrong in the new version ?
then i'm success to create project ( 5.2.28 ) and try to use artisan for get a route in my project i'm get
+-----------------+
| Middleware |
+-----------------+
| web |
| web,auth,auth |
| web,guest,guest |
+-----------------+
see in column "Middleware"
why have duplicate middleware group "web, guest, guest" why not "web, guest"
this a wrong or not ?
thank you...
Route.php
<?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('/', function () {
return view('welcome');
});
Route::auth();
Route::get('/home', 'HomeController@index');
Kernel.php
<?php
namespace LaraOTA\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\LaraOTA\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\LaraOTA\Http\Middleware\VerifyCsrfToken::class,
],
'api' => [
'throttle:60,1',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \LaraOTA\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \LaraOTA\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
];
}
Console
php artisan route:list
+--------+----------+-------------------------+------+---------------------------------------------------------------------+-----------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-------------------------+------+---------------------------------------------------------------------+-----------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | home | | LaraOTA\Http\Controllers\HomeController@index | web,auth,auth |
| | GET|HEAD | login | | LaraOTA\Http\Controllers\Auth\AuthController@showLoginForm | web,guest,guest |
| | POST | login | | LaraOTA\Http\Controllers\Auth\AuthController@login | web,guest,guest |
| | GET|HEAD | logout | | LaraOTA\Http\Controllers\Auth\AuthController@logout | web |
| | POST | password/email | | LaraOTA\Http\Controllers\Auth\PasswordController@sendResetLinkEmail | web,guest,guest |
| | POST | password/reset | | LaraOTA\Http\Controllers\Auth\PasswordController@reset | web,guest,guest |
| | GET|HEAD | password/reset/{token?} | | LaraOTA\Http\Controllers\Auth\PasswordController@showResetForm | web,guest,guest |
| | GET|HEAD | register | | LaraOTA\Http\Controllers\Auth\AuthController@showRegistrationForm | web,guest,guest |
| | POST | register | | LaraOTA\Http\Controllers\Auth\AuthController@register | web,guest,guest |
+--------+----------+-------------------------+------+---------------------------------------------------------------------+-----------------+
It's the exact same issue i reported both on Github and Laracasts yesterday. Everyone was telling me not to use the 'web' middleware and the topic got closed (even though i wasn't using the web middleware) with the out-of-the-box authentication.
Creating a new project worked for me tho.
Created new project too
@ONATBEER glad you got it working. Must of been a minor error with the new update.
Please or to participate in this conversation.