Beispiel #1
0
 /**
  * Удаление статуса
  *
  * @param Status $status
  * @return \Illuminate\Http\RedirectResponse
  * @throws \Exception
  */
 public function delete(Status $status)
 {
     if (Organization::where('status_id', $status->id)->exists()) {
         dd('Есть организации с таким статусом');
     }
     $status->delete();
     return redirect()->route('admin::status');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param Status $status
  * @return mixed
  * @throws \Exception
  */
 public function destroy(Status $status)
 {
     $status->delete();
     return redirect()->back()->withSuccess('Status removed');
 }
Beispiel #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Status $status)
 {
     // Delete the $status
     $status->delete();
     flash()->success('Status has beed deleted');
     return redirect('statuses');
 }