File: D:/HostingSpaces/SBogers10/lc-hydraulics.komma.nl/app/Providers/RouteServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use App\KommaApp\Pages\Models\Page;
use App\KommaApp\Users\Models\User;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\KommaApp';
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => ['web'],
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
//Extra routes
require app_path('KommaApp/Kms/kmsRoutes.php');
require app_path('KommaApp/Kms/kmsApiRoutes.php'); //TODO JULES Move this to mapApiRoutes :) ?
require app_path('KommaApp/Pages/pageRoutes.php');
require app_path('KommaApp/Users/userRoutes.php');
require app_path('KommaApp/Sites/siteRoutes.php');
require app_path('KommaApp/Sitemap/sitemapRoutes.php');
require app_path('KommaApp/Specialisms/specialismRoutes.php');
require app_path('KommaApp/Segments/segmentRoutes.php');
require app_path('KommaApp/Vacancies/vacancyRoutes.php');
require app_path('KommaApp/References/referenceRoutes.php');
require app_path('KommaApp/Employees/employeeRoutes.php');
// Form Routes
require app_path('KommaApp/Forms/formRoutes.php');
// Old routes from previous website
require base_path('routes/oldRoutes.php');
});
Route::group([
'middleware' => ['web'],
], function ($router) {
require app_path('KommaApp/Documents/documentRoutes.php');
});
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
}
}