diff options
| author | horus_arch | 2018-02-07 18:07:53 +0100 |
|---|---|---|
| committer | horus_arch | 2018-02-07 18:07:53 +0100 |
| commit | 92eb8143762e116e8959f6270271fd5540ca50ac (patch) | |
| tree | a9fdc5009b9816fb448431b24bac38f7a215d40d /site/routes | |
| parent | 71950479fbd6088f249e5fda3b180f294d1d745d (diff) | |
| download | alkobote-92eb8143762e116e8959f6270271fd5540ca50ac.tar.gz | |
Adds basic site in laravel.
Diffstat (limited to 'site/routes')
| -rw-r--r-- | site/routes/api.php | 18 | ||||
| -rw-r--r-- | site/routes/channels.php | 16 | ||||
| -rw-r--r-- | site/routes/console.php | 18 | ||||
| -rw-r--r-- | site/routes/web.php | 20 |
4 files changed, 72 insertions, 0 deletions
diff --git a/site/routes/api.php b/site/routes/api.php new file mode 100644 index 0000000..c641ca5 --- /dev/null +++ b/site/routes/api.php @@ -0,0 +1,18 @@ +<?php + +use Illuminate\Http\Request; + +/* +|-------------------------------------------------------------------------- +| API Routes +|-------------------------------------------------------------------------- +| +| Here is where you can register API routes for your application. These +| routes are loaded by the RouteServiceProvider within a group which +| is assigned the "api" middleware group. Enjoy building your API! +| +*/ + +Route::middleware('auth:api')->get('/user', function (Request $request) { + return $request->user(); +}); diff --git a/site/routes/channels.php b/site/routes/channels.php new file mode 100644 index 0000000..f16a20b --- /dev/null +++ b/site/routes/channels.php @@ -0,0 +1,16 @@ +<?php + +/* +|-------------------------------------------------------------------------- +| Broadcast Channels +|-------------------------------------------------------------------------- +| +| Here you may register all of the event broadcasting channels that your +| application supports. The given channel authorization callbacks are +| used to check if an authenticated user can listen to the channel. +| +*/ + +Broadcast::channel('App.User.{id}', function ($user, $id) { + return (int) $user->id === (int) $id; +}); diff --git a/site/routes/console.php b/site/routes/console.php new file mode 100644 index 0000000..75dd0cd --- /dev/null +++ b/site/routes/console.php @@ -0,0 +1,18 @@ +<?php + +use Illuminate\Foundation\Inspiring; + +/* +|-------------------------------------------------------------------------- +| Console Routes +|-------------------------------------------------------------------------- +| +| This file is where you may define all of your Closure based console +| commands. Each Closure is bound to a command instance allowing a +| simple approach to interacting with each command's IO methods. +| +*/ + +Artisan::command('inspire', function () { + $this->comment(Inspiring::quote()); +})->describe('Display an inspiring quote'); diff --git a/site/routes/web.php b/site/routes/web.php new file mode 100644 index 0000000..b3d92f4 --- /dev/null +++ b/site/routes/web.php @@ -0,0 +1,20 @@ +<?php + +/* +|-------------------------------------------------------------------------- +| Web Routes +|-------------------------------------------------------------------------- +| +| Here is where you can register web routes for your application. These +| routes are loaded by the RouteServiceProvider within a group which +| contains the "web" middleware group. Now create something great! +| +*/ + +Route::get('/', 'IndexController@showPage')->name('index'); + +Route::get('/whisky', 'WhiskyController@showPage')->name('index'); + +Route::get('/welcome', function () { + return view('welcome'); +}); |
