Removed redundant items, upgraded to laravel 5.6

This commit is contained in:
Deon George
2018-04-10 21:23:13 +10:00
parent 33658e37a3
commit f9e3b2927a
588 changed files with 35299 additions and 90438 deletions

View File

@@ -2,7 +2,7 @@
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
@@ -31,14 +31,13 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
public function map()
{
$this->mapWebRoutes($router);
$this->mapApiRoutes();
$this->mapApiRoutes($router);
$this->mapWebRoutes();
//
}
@@ -48,32 +47,27 @@ class RouteServiceProvider extends ServiceProvider
*
* These routes all receive session state, CSRF protection, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected function mapWebRoutes(Router $router)
protected function mapWebRoutes()
{
$router->group([
'namespace' => $this->namespace, 'middleware' => ['web', 'hasTeam'],
], function ($router) {
require base_path('routes/web.php');
});
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* @param \Illuminate\Routing\Router $router
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes(Router $router)
protected function mapApiRoutes()
{
$router->group([
'namespace' => $this->namespace,
'middleware' => 'api',
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}