Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $category = Category::findOrFail($id);
     $name = $category->name;
     $category->delete();
     Session::flash('status', trans('ticketit::lang.category-name-has-been-deleted', ['name' => $name]));
     return redirect()->action('\\Kordy\\Ticketit\\Controllers\\CategoriesController@index');
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $category = Category::findOrFail($id);
     $name = $category->name;
     $category->delete();
     Session::flash('status', "The category {$name} has been deleted!");
     return redirect()->action('\\Kordy\\Ticketit\\Controllers\\CategoriesController@index');
 }