@@ -5,6 +5,9 @@ |
||
| 5 | 5 | |
| 6 | 6 | trait FileUploadTrait |
| 7 | 7 | { |
| 8 | + /** |
|
| 9 | + * @param string $attribute |
|
| 10 | + */ |
|
| 8 | 11 | public function uploadFile($attribute, $file) |
| 9 | 12 | { |
| 10 | 13 | $existingFile = $this->getAttribute($attribute); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * Display a listing of the Album Reviews. |
| 19 | 19 | * |
| 20 | - * @return Response |
|
| 20 | + * @return \Illuminate\View\View |
|
| 21 | 21 | */ |
| 22 | 22 | public function index() |
| 23 | 23 | { |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * Display a listing of the resource. |
| 30 | 30 | * |
| 31 | - * @return Response |
|
| 31 | + * @return \Illuminate\View\View |
|
| 32 | 32 | */ |
| 33 | 33 | public function new_review() |
| 34 | 34 | { |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * Display a listing of the djs. |
| 26 | 26 | * |
| 27 | - * @return Response |
|
| 27 | + * @return \Illuminate\View\View |
|
| 28 | 28 | */ |
| 29 | 29 | public function index() |
| 30 | 30 | { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * Show the form for editing the specified resource. |
| 67 | 67 | * |
| 68 | 68 | * @param int $id |
| 69 | - * @return Response |
|
| 69 | + * @return \Illuminate\View\View |
|
| 70 | 70 | */ |
| 71 | 71 | public function edit($id) |
| 72 | 72 | { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $dj = new DJ($request->all()); |
| 48 | 48 | |
| 49 | - if($request->hasFile('picture')) |
|
| 49 | + if ($request->hasFile('picture')) |
|
| 50 | 50 | { |
| 51 | 51 | $file = $request->file('picture'); |
| 52 | 52 | $dj->uploadFile('picture', $file); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $dj = DJ::findOrFail($id); |
| 87 | 87 | $dj->fill($request->except(['picture'])); |
| 88 | 88 | |
| 89 | - if($request->hasFile('picture')) |
|
| 89 | + if ($request->hasFile('picture')) |
|
| 90 | 90 | { |
| 91 | 91 | $file = $request->file('picture'); |
| 92 | 92 | $dj->uploadFile('picture', $file); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $dj = DJ::findOrFail($id); |
| 114 | - File::delete(public_path().'/img/djs/'.$dj->picture); |
|
| 114 | + File::delete(public_path() . '/img/djs/' . $dj->picture); |
|
| 115 | 115 | DJ::destroy($id); |
| 116 | 116 | return redirect()->route('admin.djs.index') |
| 117 | 117 | ->with('success', 'DJ Deleted!'); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | /** |
| 19 | 19 | * Display a listing of the resource. |
| 20 | 20 | * |
| 21 | - * @return Response |
|
| 21 | + * @return \Illuminate\View\View |
|
| 22 | 22 | */ |
| 23 | 23 | public function index() |
| 24 | 24 | { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Display a listing of the resource. |
| 31 | 31 | * |
| 32 | - * @return Response |
|
| 32 | + * @return \Illuminate\View\View |
|
| 33 | 33 | */ |
| 34 | 34 | public function new_position() |
| 35 | 35 | { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Display a listing of the Events. |
| 22 | 22 | * |
| 23 | - * @return Response |
|
| 23 | + * @return \Illuminate\View\View |
|
| 24 | 24 | */ |
| 25 | 25 | public function index() |
| 26 | 26 | { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Display a listing of the resource. |
| 33 | 33 | * |
| 34 | - * @return Response |
|
| 34 | + * @return \Illuminate\View\View |
|
| 35 | 35 | */ |
| 36 | 36 | public function new_event() |
| 37 | 37 | { |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | public function delete($id) |
| 86 | 86 | { |
| 87 | 87 | $event = Event::findOrFail($id); |
| 88 | - File::delete(public_path().'/img/events/'.$event->picture); |
|
| 88 | + File::delete(public_path() . '/img/events/' . $event->picture); |
|
| 89 | 89 | Event::destroy($id); |
| 90 | 90 | return redirect()->route('admin.events.index') |
| 91 | 91 | ->with('success', 'Event Deleted!'); |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | /** |
| 30 | 30 | * Update the specified resource in storage. |
| 31 | 31 | * |
| 32 | - * @param int $id |
|
| 33 | 32 | * @return Response |
| 34 | 33 | */ |
| 35 | 34 | public function update(Request $request) |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Display a listing of the Shows. |
| 22 | 22 | * |
| 23 | - * @return Response |
|
| 23 | + * @return \Illuminate\View\View |
|
| 24 | 24 | */ |
| 25 | 25 | public function index() |
| 26 | 26 | { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Display a listing of the resource. |
| 33 | 33 | * |
| 34 | - * @return Response |
|
| 34 | + * @return \Illuminate\View\View |
|
| 35 | 35 | */ |
| 36 | 36 | public function new_show() |
| 37 | 37 | { |
@@ -29,8 +29,7 @@ |
||
| 29 | 29 | /** |
| 30 | 30 | * Update the specified resource in storage. |
| 31 | 31 | * |
| 32 | - * @param int $id |
|
| 33 | - * @return Response |
|
| 32 | + * @return \Illuminate\Http\RedirectResponse |
|
| 34 | 33 | */ |
| 35 | 34 | public function update(Request $request) |
| 36 | 35 | { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * Display a listing of the Users. |
| 28 | 28 | * |
| 29 | - * @return Response |
|
| 29 | + * @return \Illuminate\View\View |
|
| 30 | 30 | */ |
| 31 | 31 | public function index() |
| 32 | 32 | { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** |
| 44 | 44 | * Show the form for creating a new resource. |
| 45 | 45 | * |
| 46 | - * @return Response |
|
| 46 | + * @return \Illuminate\Http\RedirectResponse|null |
|
| 47 | 47 | */ |
| 48 | 48 | public function create(Requests\CreateRequest $request) |
| 49 | 49 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * Show the form for editing the specified resource. |
| 72 | 72 | * |
| 73 | 73 | * @param int $id |
| 74 | - * @return Response |
|
| 74 | + * @return \Illuminate\View\View |
|
| 75 | 75 | */ |
| 76 | 76 | public function edit($id) |
| 77 | 77 | { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Remove the specified resource from storage. |
| 97 | 97 | * |
| 98 | 98 | * @param int $id |
| 99 | - * @return Response |
|
| 99 | + * @return \Illuminate\Http\RedirectResponse |
|
| 100 | 100 | */ |
| 101 | 101 | public function delete($id) |
| 102 | 102 | { |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | public function delete($id) |
| 102 | 102 | { |
| 103 | 103 | $user = User::findOrFail($id); |
| 104 | - File::delete(public_path().'/img/djs/'.$user->picture); |
|
| 104 | + File::delete(public_path() . '/img/djs/' . $user->picture); |
|
| 105 | 105 | User::destroy($id); |
| 106 | 106 | return redirect()->route('admin.users.index') |
| 107 | 107 | ->with('success', 'User Deleted!'); |