summaryrefslogtreecommitdiff
path: root/site/app/Providers/RouteServiceProvider.php
diff options
context:
space:
mode:
authorhorus_arch2018-02-07 18:07:53 +0100
committerhorus_arch2018-02-07 18:07:53 +0100
commit92eb8143762e116e8959f6270271fd5540ca50ac (patch)
treea9fdc5009b9816fb448431b24bac38f7a215d40d /site/app/Providers/RouteServiceProvider.php
parent71950479fbd6088f249e5fda3b180f294d1d745d (diff)
downloadalkobote-92eb8143762e116e8959f6270271fd5540ca50ac.tar.gz
Adds basic site in laravel.
Diffstat (limited to 'site/app/Providers/RouteServiceProvider.php')
-rw-r--r--site/app/Providers/RouteServiceProvider.php73
1 files changed, 73 insertions, 0 deletions
diff --git a/site/app/Providers/RouteServiceProvider.php b/site/app/Providers/RouteServiceProvider.php
new file mode 100644
index 0000000..5ea48d3
--- /dev/null
+++ b/site/app/Providers/RouteServiceProvider.php
@@ -0,0 +1,73 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Support\Facades\Route;
+use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+
+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\Http\Controllers';
+
+ /**
+ * Define your route model bindings, pattern filters, etc.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ //
+
+ parent::boot();
+ }
+
+ /**
+ * 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::middleware('web')
+ ->namespace($this->namespace)
+ ->group(base_path('routes/web.php'));
+ }
+
+ /**
+ * Define the "api" routes for the application.
+ *
+ * These routes are typically stateless.
+ *
+ * @return void
+ */
+ protected function mapApiRoutes()
+ {
+ Route::prefix('api')
+ ->middleware('api')
+ ->namespace($this->namespace)
+ ->group(base_path('routes/api.php'));
+ }
+}