Squashed commit of the following:
commit 70d23bbd8fbdbeb3b6554e42ac4283396372f39d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Feb 3 21:40:55 2017 +0000 Updade to Laravel 5.4
This commit is contained in:
parent
9ee898ba7c
commit
0a07811311
33 changed files with 581 additions and 606 deletions
|
@ -13,6 +13,6 @@ use Illuminate\Http\Request;
|
|||
|
|
||||
*/
|
||||
|
||||
Route::get('/user', function (Request $request) {
|
||||
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
})->middleware('auth:api');
|
||||
});
|
||||
|
|
16
routes/channels.php
Normal file
16
routes/channels.php
Normal 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;
|
||||
});
|
|
@ -5,9 +5,9 @@
|
|||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of the routes that are handled
|
||||
| by your application. Just tell Laravel the URIs it should respond
|
||||
| to using a Closure or controller method. Build something great!
|
||||
| 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!
|
||||
|
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue