@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | // Delete an existing system - note this will fail if the system has any customers or tech tips assigned to it |
| 212 | - public function destroy($id) |
|
| 213 | - { |
|
| 214 | - // |
|
| 215 | - try { |
|
| 212 | + public function destroy($id) |
|
| 213 | + { |
|
| 214 | + // |
|
| 215 | + try { |
|
| 216 | 216 | SystemTypes::find($id)->delete(); |
| 217 | 217 | return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']); |
| 218 | 218 | } |
@@ -220,5 +220,5 @@ discard block |
||
| 220 | 220 | { |
| 221 | 221 | return response()->json(['success' => false, 'reason' => 'Cannot delete this equipment. It has Customers or Tech Tips assigned to it. Please delete those first.']); |
| 222 | 222 | } |
| 223 | - } |
|
| 223 | + } |
|
| 224 | 224 | } |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | public function run() |
| 13 | 13 | { |
| 14 | 14 | // TODO: add seeders for demo setup |
| 15 | - $this->call(UserTableSeeder::class); |
|
| 16 | - $this->call(EquipmentSeeder::class); |
|
| 17 | - $this->call(CustomerSeeder::class); |
|
| 18 | - $this->call(TechTipsSeeder::class); |
|
| 15 | + $this->call(UserTableSeeder::class); |
|
| 16 | + $this->call(EquipmentSeeder::class); |
|
| 17 | + $this->call(CustomerSeeder::class); |
|
| 18 | + $this->call(TechTipsSeeder::class); |
|
| 19 | 19 | } |
| 20 | 20 | } |
@@ -34,12 +34,12 @@ |
||
| 34 | 34 | $totalLinks = FileLinks::where('user_id', Auth::user()->user_id)->count(); |
| 35 | 35 | |
| 36 | 36 | return view('dashboard', [ |
| 37 | - 'custFavs' => $custFavs, |
|
| 38 | - 'tipFavs' => $tipFavs, |
|
| 39 | - 'tips30' => $tips30Days, |
|
| 40 | - 'tipsAll' => $tipsTotal, |
|
| 41 | - 'activeLinks' => $activeLinks, |
|
| 42 | - 'totalLinks' => $totalLinks, |
|
| 37 | + 'custFavs' => $custFavs, |
|
| 38 | + 'tipFavs' => $tipFavs, |
|
| 39 | + 'tips30' => $tips30Days, |
|
| 40 | + 'tipsAll' => $tipsTotal, |
|
| 41 | + 'activeLinks' => $activeLinks, |
|
| 42 | + 'totalLinks' => $totalLinks, |
|
| 43 | 43 | ]); |
| 44 | 44 | } |
| 45 | 45 | |