@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function __construct() |
| 10 | 10 | { |
| 11 | - $this->reloadTimeout = config('timecontrol.refreshInterval'); |
|
| 11 | + $this->reloadTimeout = config('timecontrol.refreshInterval'); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | /** |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * Store a newly created resource in storage. |
| 42 | 42 | * |
| 43 | 43 | * @param \Illuminate\Http\Request $request |
| 44 | - * @return \Illuminate\Http\Response |
|
| 44 | + * @return \Illuminate\Http\RedirectResponse |
|
| 45 | 45 | */ |
| 46 | 46 | public function store(Request $request) |
| 47 | 47 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\Tasks; |
| 6 | 6 | use Illuminate\Http\Request; |
| 7 | - |
|
| 8 | 7 | use App\Http\Requests; |
| 9 | 8 | use App\Http\Controllers\Controller; |
| 10 | 9 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * Include Managers |
| 39 | 39 | * |
| 40 | 40 | * @param Departments $department |
| 41 | - * @return Fractal\Resource\Item |
|
| 41 | + * @return Fractal\Resource\Collection |
|
| 42 | 42 | */ |
| 43 | 43 | public function includeManagers(Departments $department) |
| 44 | 44 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function transform(Departments $department) |
| 28 | 28 | { |
| 29 | 29 | return [ |
| 30 | - 'id' => (int) $department->id, |
|
| 30 | + 'id' => (int) $department->id, |
|
| 31 | 31 | 'name' => (string) $department->department_name, |
| 32 | 32 | 'managers' => (string) $department->department_manager, |
| 33 | 33 | 'description' => (string) $department->department_description |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public function transform(Departments $manager) |
| 21 | 21 | { |
| 22 | 22 | return [ |
| 23 | - 'id' => (int) $manager->id, |
|
| 23 | + 'id' => (int) $manager->id, |
|
| 24 | 24 | ]; |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | */ |
| 138 | 138 | public function destroy($id) |
| 139 | 139 | { |
| 140 | - if (! empty($id)) { |
|
| 140 | + if (!empty($id)) { |
|
| 141 | 141 | Departments::destroy($id); |
| 142 | 142 | |
| 143 | 143 | $data = []; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * Store a newly created resource in storage. |
| 45 | 45 | * |
| 46 | 46 | * @param Requests\HolidayValidator $input |
| 47 | - * @return \Illuminate\Http\Response |
|
| 47 | + * @return \Illuminate\Http\RedirectResponse |
|
| 48 | 48 | */ |
| 49 | 49 | public function store(Requests\HolidayValidator $input) |
| 50 | 50 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @param Requests\HolidayValidator $input |
| 91 | 91 | * @param int | $id | The database id. |
| 92 | - * @return \Illuminate\Http\Response |
|
| 92 | + * @return \Illuminate\Http\RedirectResponse |
|
| 93 | 93 | */ |
| 94 | 94 | public function update(Requests\HolidayValidator $input, $id) |
| 95 | 95 | { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * Remove the specified resource from storage. |
| 106 | 106 | * |
| 107 | 107 | * @param int | $id | The database id. |
| 108 | - * @return \Illuminate\Http\Response |
|
| 108 | + * @return \Illuminate\Http\RedirectResponse |
|
| 109 | 109 | */ |
| 110 | 110 | public function destroy($id) |
| 111 | 111 | { |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use Illuminate\Http\Request; |
|
| 6 | - |
|
| 7 | 5 | use App\Http\Requests; |
| 8 | 6 | use App\Http\Controllers\Controller; |
| 9 | 7 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $this->middleware('lang'); |
| 19 | 19 | $this->middleware('auth'); |
| 20 | 20 | |
| 21 | - if (! auth()->user()->is('Manager')) { |
|
| 21 | + if (!auth()->user()->is('Manager')) { |
|
| 22 | 22 | return redirect()->back(); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function handle($request, Closure $next) |
| 17 | 17 | { |
| 18 | - if(auth()->user()->is('Manager')) { |
|
| 18 | + if (auth()->user()->is('Manager')) { |
|
| 19 | 19 | return $next($request); |
| 20 | 20 | } else { |
| 21 | 21 | return redirect()->back(302); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * Store a newly created resource in storage. |
| 45 | 45 | * |
| 46 | 46 | * @param Requests\HolidayValidator $input |
| 47 | - * @return \Illuminate\Http\Response |
|
| 47 | + * @return \Illuminate\Http\RedirectResponse |
|
| 48 | 48 | */ |
| 49 | 49 | public function store(Requests\HolidayValidator $input) |
| 50 | 50 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @param Requests\HolidayValidator $input |
| 91 | 91 | * @param int | $id | The database id. |
| 92 | - * @return \Illuminate\Http\Response |
|
| 92 | + * @return \Illuminate\Http\RedirectResponse |
|
| 93 | 93 | */ |
| 94 | 94 | public function update(Requests\HolidayValidator $input, $id) |
| 95 | 95 | { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * Remove the specified resource from storage. |
| 106 | 106 | * |
| 107 | 107 | * @param int | $id | The database id. |
| 108 | - * @return \Illuminate\Http\Response |
|
| 108 | + * @return \Illuminate\Http\RedirectResponse |
|
| 109 | 109 | */ |
| 110 | 110 | public function destroy($id) |
| 111 | 111 | { |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use Illuminate\Http\Request; |
| 6 | 6 | use App\Http\Requests; |
| 7 | 7 | use App\Departments; |
| 8 | -use App\DepartmentMembers; |
|
| 9 | -use Mail; |
|
| 10 | 8 | use App\User; |
| 11 | 9 | use App\Http\Controllers\Controller; |
| 12 | 10 | |