예제 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (Gate::denies('admin')) {
         abort(403);
     }
     Track::destroy($id);
     return redirect()->route('track.index')->with('alert-success', [trans('htmusic.deleted')]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Track::destroy($id);
 }
예제 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Track $track)
 {
     if (Request::ajax()) {
         return Track::findOrFail($track->id) ? Track::destroy($track->id) : null;
     } else {
     }
     Track::findOrFail($track->id) ? Track::destroy($track->id) : null;
     flash('Track is deleted');
     return redirect('tracks');
 }