コード例 #1
0
 public function destroy($tournamentId, $eventId)
 {
     Event::findOrFail($eventId)->delete();
     return redirect('/admin/tournaments/' . $tournamentId)->withFlashSuccess('Event deleted');
 }
コード例 #2
0
 /**
  * @test
  */
 public function canDeleteEvent()
 {
     $event = Event::orderBy('created_at', 'DESC')->first();
     $this->visit('/admin/tournaments/' . $event->tournament->id)->click('#delete-' . $event->id)->see($event->name);
 }