示例#1
0
 /**
  * Remove the specified resource from storage.
  * DELETE|/booking/{id}|destroy|booking.destroy
  *
  * @param int $id
  * @return Response
  */
 public function destroy($id)
 {
     $booking = \Trails\Models\Booking::find($id);
     $booking->delete();
     \Session::flash('message', 'Successfully deleted booking!');
     return \Redirect::to('booking');
 }
示例#2
0
 /**
  * @test
  * @large
  */
 public function testTrack()
 {
     $booking = Booking::find(1);
     $assert = $booking->track;
     $this->assertInstanceOf('Trails\\Models\\Track', $assert);
     $this->assertEquals(3, $assert->id);
     $this->assertEquals('A planned session', $assert->name);
     $this->assertEquals(TrackStatus::PLANNED, $assert->status);
     $this->assertEquals('Very very planned!', $assert->description);
 }