@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * Store a newly created resource in storage. |
| 50 | 50 | * |
| 51 | 51 | * @param Requests\DepartmentsValidator $input |
| 52 | - * @return \Illuminate\Http\Response |
|
| 52 | + * @return \Illuminate\Http\RedirectResponse |
|
| 53 | 53 | */ |
| 54 | 54 | public function store(Requests\DepartmentsValidator $input) |
| 55 | 55 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @param Requests\DepartmentsValidator $input |
| 88 | 88 | * @param int $id the department id in the database. |
| 89 | - * @return \Illuminate\Http\Response |
|
| 89 | + * @return \Illuminate\Http\RedirectResponse |
|
| 90 | 90 | */ |
| 91 | 91 | public function update(Requests\DepartmentsValidator $input, $id) |
| 92 | 92 | { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * Remove the specified resource from storage. |
| 99 | 99 | * |
| 100 | 100 | * @param int $id the department id in the database. |
| 101 | - * @return \Illuminate\Http\Response |
|
| 101 | + * @return \Illuminate\Http\RedirectResponse |
|
| 102 | 102 | */ |
| 103 | 103 | public function destroy($id) |
| 104 | 104 | { |
@@ -88,8 +88,7 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | session()->flash('message', 'The new user has been created and is assigned to his department and role.'); |
| 90 | 90 | return redirect("staff"); |
| 91 | - } |
|
| 92 | - else |
|
| 91 | + } else |
|
| 93 | 92 | { |
| 94 | 93 | return redirect()->back(302); |
| 95 | 94 | } |
@@ -193,8 +192,7 @@ discard block |
||
| 193 | 192 | session()->flash('message', 'The user has been removed.'); |
| 194 | 193 | |
| 195 | 194 | return redirect()->to('/staff'); |
| 196 | - } |
|
| 197 | - else |
|
| 195 | + } else |
|
| 198 | 196 | { |
| 199 | 197 | return redirect()->back(); |
| 200 | 198 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * Show the application dashboard. |
| 24 | 24 | * |
| 25 | - * @return \Illuminate\Http\Response |
|
| 25 | + * @return \Illuminate\Http\RedirectResponse |
|
| 26 | 26 | */ |
| 27 | 27 | public function index() |
| 28 | 28 | { |
@@ -30,13 +30,9 @@ |
||
| 30 | 30 | |
| 31 | 31 | if(Bouncer::is($user)->a('Administrator', 'Manager')) { |
| 32 | 32 | return redirect()->route('dashboard.administration'); |
| 33 | - } |
|
| 34 | - |
|
| 35 | - elseif(Bouncer::is($user)->an('Agent')) { |
|
| 33 | + } elseif(Bouncer::is($user)->an('Agent')) { |
|
| 36 | 34 | return redirect()->route('dashboard.agent'); |
| 37 | - } |
|
| 38 | - |
|
| 39 | - elseif(Bouncer::is($user)->an('Customer')) { |
|
| 35 | + } elseif(Bouncer::is($user)->an('Customer')) { |
|
| 40 | 36 | return redirect('/'); |
| 41 | 37 | } |
| 42 | 38 | return redirect('/'); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | /** |
| 51 | 51 | * Save the customer. |
| 52 | 52 | * |
| 53 | - * @return \Illuminate\Http\Response |
|
| 53 | + * @return \Illuminate\Http\RedirectResponse |
|
| 54 | 54 | */ |
| 55 | 55 | public function registerCustomer(Request $request) |
| 56 | 56 | { |
@@ -50,13 +50,9 @@ |
||
| 50 | 50 | |
| 51 | 51 | if(Bouncer::is($user)->a('Administrator', 'Manager')) { |
| 52 | 52 | return redirect()->route('dashboard.administration'); |
| 53 | - } |
|
| 54 | - |
|
| 55 | - elseif(Bouncer::is($user)->an('Agents')) { |
|
| 53 | + } elseif(Bouncer::is($user)->an('Agents')) { |
|
| 56 | 54 | return redirect()->route('dashboard.agent'); |
| 57 | - } |
|
| 58 | - |
|
| 59 | - elseif(Bouncer::is($user)->an('Customer')) { |
|
| 55 | + } elseif(Bouncer::is($user)->an('Customer')) { |
|
| 60 | 56 | return redirect('/'); |
| 61 | 57 | } |
| 62 | 58 | |