diff --git a/app/Http/Controllers/DecorationsController.php b/app/Http/Controllers/DecorationsController.php index fb4ece1..65dbdf0 100644 --- a/app/Http/Controllers/DecorationsController.php +++ b/app/Http/Controllers/DecorationsController.php @@ -67,6 +67,8 @@ class DecorationsController extends Controller { decorationsFirefighters::where('id',$id)->delete(); - return back(); + return response()->json([ + 'success' => 'Record deleted successfully!' + ]); } } diff --git a/app/Http/Controllers/VehiclesController.php b/app/Http/Controllers/VehiclesController.php index 17deb49..ee9889f 100644 --- a/app/Http/Controllers/VehiclesController.php +++ b/app/Http/Controllers/VehiclesController.php @@ -175,7 +175,9 @@ class VehiclesController extends Controller public function destroy($id) { vehicle::where('id',$id)->delete(); - return redirect()->to('/pojazdy'); + return response()->json([ + 'success' => 'Record deleted successfully!' + ]); } public function activate() diff --git a/resources/views/decorations.blade.php b/resources/views/decorations.blade.php index db432d9..a5a1448 100644 --- a/resources/views/decorations.blade.php +++ b/resources/views/decorations.blade.php @@ -1,5 +1,7 @@ @extends('layout.app') + + @section('left-menu') @parent