@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function handle() |
| 43 | 43 | { |
| 44 | 44 | |
| 45 | - try{ |
|
| 45 | + try { |
|
| 46 | 46 | |
| 47 | 47 | $id = $this->argument('id') ? $this->argument('id') : $this->ask('Event id?'); |
| 48 | 48 | $count = Task::destroy($id); |
@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | // ]); |
| 55 | 55 | |
| 56 | 56 | |
| 57 | - } catch ( Exception $e) { |
|
| 57 | + } catch (Exception $e) { |
|
| 58 | 58 | $this->error('error' . $e); |
| 59 | 59 | } |
| 60 | - if($count == 0){ |
|
| 60 | + if ($count == 0) { |
|
| 61 | 61 | $this->alert("Task does not exist"); |
| 62 | 62 | }else { |
| 63 | 63 | $this->info('Task has been deleted to database succesfully'); |
@@ -46,12 +46,12 @@ |
||
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | |
| 49 | - try{ |
|
| 49 | + try { |
|
| 50 | 50 | |
| 51 | 51 | Task::create([ |
| 52 | 52 | 'name'=>$this->argument('name') ? $this->argument('name') : $this->ask('Event name?') |
| 53 | 53 | ]); |
| 54 | - } catch ( Exception $e) { |
|
| 54 | + } catch (Exception $e) { |
|
| 55 | 55 | $this->error('error' . $e); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -42,13 +42,13 @@ |
||
| 42 | 42 | //$headers = ['id','name','created_at','updated_at']; |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - try{ |
|
| 45 | + try { |
|
| 46 | 46 | $tasks = Task::all()->toArray(); |
| 47 | 47 | $headers = array_keys($tasks[0]); |
| 48 | 48 | |
| 49 | - $this->table($headers,$tasks); |
|
| 49 | + $this->table($headers, $tasks); |
|
| 50 | 50 | |
| 51 | - }catch (exception $e){ |
|
| 51 | + } catch (exception $e) { |
|
| 52 | 52 | $this->error('Error: ' . $e); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | protected function commands() |
| 37 | 37 | { |
| 38 | - $this->load(__DIR__.'/Commands'); |
|
| 38 | + $this->load(__DIR__ . '/Commands'); |
|
| 39 | 39 | |
| 40 | 40 | require base_path('routes/console.php'); |
| 41 | 41 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $tasks = Task::all(); |
| 19 | 19 | //return view('tasks',['tasks' => json_encode($tasks)]); |
| 20 | - return view('tasks_php',['tasks' => $tasks]); |
|
| 20 | + return view('tasks_php', ['tasks' => $tasks]); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // 'task'=>$task->name |
| 60 | 60 | // ]); |
| 61 | 61 | |
| 62 | - return view('show_task',['task' => $task]); |
|
| 62 | + return view('show_task', ['task' => $task]); |
|
| 63 | 63 | |
| 64 | 64 | } |
| 65 | 65 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | |
| 16 | - public function show(User $user){ |
|
| 16 | + public function show(User $user) { |
|
| 17 | 17 | |
| 18 | 18 | return $user; |
| 19 | 19 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'password' => 'required|min:6' |
| 31 | 31 | ]); |
| 32 | 32 | |
| 33 | - $user = User::create([ |
|
| 33 | + $user = User::create([ |
|
| 34 | 34 | 'name' => $request->name, |
| 35 | 35 | 'username' => $request->username, |
| 36 | 36 | 'email' => $request->email, |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function username() |
| 59 | 59 | { |
| 60 | - return config('auth.providers.users.field','email'); |
|
| 60 | + return config('auth.providers.users.field', 'email'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // will update the password on an actual user model and persist it to the |
| 38 | 38 | // database. Otherwise we will parse the error and return the response. |
| 39 | 39 | $response = $this->broker()->reset( |
| 40 | - $this->credentials($request), function ($user, $password) { |
|
| 40 | + $this->credentials($request), function($user, $password) { |
|
| 41 | 41 | $this->resetPassword($user, $password); |
| 42 | 42 | } |
| 43 | 43 | ); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @param string $response |
| 58 | 58 | * @return \Illuminate\Http\RedirectResponse |
| 59 | 59 | */ |
| 60 | - protected function sendResetResponse(Request $request,$response) |
|
| 60 | + protected function sendResetResponse(Request $request, $response) |
|
| 61 | 61 | { |
| 62 | 62 | if ($request->expectsJson()) { |
| 63 | 63 | return response()->json([ |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | protected function sendResetFailedResponse(Request $request, $response) |
| 79 | 79 | { |
| 80 | 80 | if ($request->expectsJson()) { |
| 81 | - return new JsonResponse(['email' => trans($response) ], 422); |
|
| 81 | + return new JsonResponse(['email' => trans($response)], 422); |
|
| 82 | 82 | } |
| 83 | 83 | return redirect()->back() |
| 84 | 84 | ->withInput($request->only('email')) |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | 'email' => $data['email'], |
| 84 | 84 | 'password' => bcrypt($data['password']), |
| 85 | 85 | ]; |
| 86 | - if (config('auth.providers.users.field','email') === 'username' && isset($data['username'])) { |
|
| 86 | + if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) { |
|
| 87 | 87 | $fields['username'] = $data['username']; |
| 88 | 88 | } |
| 89 | 89 | return User::create($fields); |