Пример #1
0
 /**
  * Delete brand
  * 
  * @param Brand $brand
  * @return \Illiminate\Http\RedirectResponse
  */
 public function delete(Brand $brand)
 {
     if ($brand->id !== 1) {
         $brand->delete();
     }
     return redirect('admin/brands/list');
 }
Пример #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Brand $brand)
 {
     // Delete brand of $id
     $brand->delete();
     flash()->success('Brand has been deleted!');
     return redirect('brands');
 }