Various updated files.

This commit is contained in:
James Cole
2017-09-09 22:32:11 +02:00
parent 3b9b74b5ea
commit 9223f3ef71
27 changed files with 605 additions and 914 deletions

15
routes/api.php Executable file → Normal file
View File

@@ -1,15 +1,6 @@
<?php
/**
* api.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
@@ -21,3 +12,7 @@ declare(strict_types=1);
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});

16
routes/channels.php Normal file
View File

@@ -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;
});

15
routes/console.php Executable file → Normal file
View File

@@ -1,15 +1,6 @@
<?php
/**
* console.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
use Illuminate\Foundation\Inspiring;
/*
|--------------------------------------------------------------------------
@@ -21,3 +12,7 @@ declare(strict_types=1);
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->describe('Display an inspiring quote');