@@ -68,8 +68,8 @@ |
||
| 68 | 68 | 'body' => 'required', |
| 69 | 69 | ]); |
| 70 | 70 | |
| 71 | - $data = request()->only(['title', 'body', 'forked_id']); |
|
| 72 | - $data['user_id'] = auth()->user()->id; |
|
| 71 | + $data = request()->only([ 'title', 'body', 'forked_id' ]); |
|
| 72 | + $data[ 'user_id' ] = auth()->user()->id; |
|
| 73 | 73 | |
| 74 | 74 | Snippet::create($data); |
| 75 | 75 | |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct() |
| 36 | 36 | { |
| 37 | - $this->middleware('guest', ['except' => 'logout']); |
|
| 37 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -64,10 +64,10 @@ |
||
| 64 | 64 | protected function create(array $data) |
| 65 | 65 | { |
| 66 | 66 | return User::create([ |
| 67 | - 'name' => $data['name'], |
|
| 68 | - 'username' => $data['username'], |
|
| 69 | - 'email' => $data['email'], |
|
| 70 | - 'password' => bcrypt($data['password']), |
|
| 67 | + 'name' => $data[ 'name' ], |
|
| 68 | + 'username' => $data[ 'username' ], |
|
| 69 | + 'email' => $data[ 'email' ], |
|
| 70 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 71 | 71 | ]); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | protected function mapWebRoutes() |
| 53 | 53 | { |
| 54 | 54 | Route::middleware('web') |
| 55 | - ->namespace($this->namespace) |
|
| 56 | - ->group(base_path('routes/web.php')); |
|
| 55 | + ->namespace($this->namespace) |
|
| 56 | + ->group(base_path('routes/web.php')); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | protected function mapApiRoutes() |
| 67 | 67 | { |
| 68 | 68 | Route::prefix('api') |
| 69 | - ->middleware('api') |
|
| 70 | - ->namespace($this->namespace) |
|
| 71 | - ->group(base_path('routes/api.php')); |
|
| 69 | + ->middleware('api') |
|
| 70 | + ->namespace($this->namespace) |
|
| 71 | + ->group(base_path('routes/api.php')); |
|
| 72 | 72 | } |
| 73 | 73 | } |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Model extends Eloquent |
| 8 | 8 | { |
| 9 | - protected $guarded = []; |
|
| 9 | + protected $guarded = [ ]; |
|
| 10 | 10 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | protected function unauthenticated($request, AuthenticationException $exception) |
| 58 | 58 | { |
| 59 | 59 | if ($request->expectsJson()) { |
| 60 | - return response()->json(['error' => 'Unauthenticated.'], 401); |
|
| 60 | + return response()->json([ 'error' => 'Unauthenticated.' ], 401); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | return redirect()->guest(route('login')); |
@@ -114,6 +114,6 @@ |
||
| 114 | 114 | | |
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | - 'attributes' => [], |
|
| 117 | + 'attributes' => [ ], |
|
| 118 | 118 | |
| 119 | 119 | ]; |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | * @author Taylor Otwell <[email protected]> |
| 7 | 7 | */ |
| 8 | 8 | $uri = urldecode( |
| 9 | - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
| 9 | + parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
| 10 | 10 | ); |
| 11 | 11 | |
| 12 | 12 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Route::middleware('auth:api')->get('/user', function (Request $request) { |
|
| 16 | +Route::middleware('auth:api')->get('/user', function(Request $request) { |
|
| 17 | 17 | return $request->user(); |
| 18 | 18 | }); |