Exemplo n.º 1
0
 public function destroy(Family $family)
 {
     if (is_integer($family)) {
         $family = Family::find($family);
     }
     $family->delete();
     Flash::success('Family has been created Deleted!');
     return Redirect::back();
 }
 public function edit(VehicleType $vehicleType)
 {
     $families = Family::lists("name", "id");
     $users = User::select(\DB::raw("CONCAT(surname, ' ', name) AS full_name, id"))->lists("full_name", "id");
     $dealsterms = Dealsterm::lists("Description", "idDealsTerm");
     $dealsstages = Dealsstage::lists("Description", "idDealsStage");
     $dealscategories = Dealscategory::lists("Description", "idDealsCategories");
     $vehicleTypes = VehicleType::lists("name", "id");
     return View::make('Middle.Web.VehicleType.edit', compact(['vehicleType', 'contacts', 'families', 'users', 'dealsterms', 'dealsstages', 'dealscategories', 'vehicleTypes', 'contacts']));
 }
Exemplo n.º 3
0
 public function destroy($family)
 {
     $family = Family::find($family);
     $family->delete();
     return response(['data' => true, 'status' => 'success', 'message' => 'successfully deleted']);
 }