Exemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $location = Location::firstOrFail();
     $user = User::firstOrFail();
     $sport = Sport::all();
     $event = new GameEvent();
     $event->sport_id = 2;
     $event->event_name = 'Fútbol Game';
     $event->start_time = 'Monday, Oct. 5, 2015 1:00 pm';
     $event->end_time = 'Monday, Oct. 5, 2015 4:00 pm';
     $event->location_id = $location->id;
     $event->gender = 'Co-Ed';
     $event->skill_level = 'Intermediate';
     $event->amount = 2.0;
     $event->organizer_id = 1;
     $event->event_image = 'http://lorempixel.com/200/200/sports/6/';
     $event->description = 'testing 123';
     $event->save();
 }
Exemplo n.º 2
0
 /**
  * @param string $gameId
  * @param $word
  * @param $datetime
  */
 public function __construct($gameId, $word, $datetime)
 {
     parent::__construct($gameId);
     $this->word = $word;
     $this->startTime = $datetime;
 }
Exemplo n.º 3
0
 /**
  * WrongLetterGuessed constructor.
  * @param string $gameId
  * @param string $letter
  */
 public function __construct($gameId, $letter)
 {
     parent::__construct($gameId);
     $this->letter = $letter;
 }
 /**
  * Remove the specified gameevent from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $event = GameEvent::findOrFail($id);
     $event->delete();
     if (Request::wantsJson()) {
         return Response::json(array('Status' => 'Request Succeeded'));
     } else {
         Session::flash('successMessage', 'This event has been successfully deleted.');
         return Redirect::action('GameEventsController@index');
     }
 }
Exemplo n.º 5
0
 /**
  * GameLost constructor.
  * @param string $gameId
  * @param \DateTime $time
  */
 public function __construct($gameId, $time)
 {
     parent::__construct($gameId);
     $this->expandedTimeOnGame = $time;
 }
Exemplo n.º 6
0
 /**
  * @param string $gameId
  * @param string $word
  */
 public function __construct($gameId, $word)
 {
     parent::__construct($gameId);
     $this->word = $word;
 }