Ejemplo n.º 1
0
 public function setupAsHeadCoach()
 {
     $this->headCoach = User::where('email', DatabaseSeeder::HEAD_COACH_EMAIL)->first();
     $this->group = Group::where('name', DatabaseSeeder::GROUP_NAME)->first();
     $this->season = Season::orderBy('id', 'DESC')->first();
     $this->actingAs($this->headCoach)->withSession([SessionManager::GROUP => $this->group->toArray(), SessionManager::SEASON => $this->season->toArray()]);
 }
Ejemplo n.º 2
0
 public function setSeason(Season $season)
 {
     $this->season = $season;
     $this->set(self::SEASON, $season->toArray());
 }
Ejemplo n.º 3
0
 public function setupAsGuardian()
 {
     $this->guardian = User::where('email', DatabaseSeeder::GUARDIAN_EMAIL)->first();
     $this->season = Season::orderBy('id', 'DESC')->first();
     $this->actingAs($this->guardian)->withSession([SessionManager::SEASON => $this->season->toArray()]);
 }
Ejemplo n.º 4
0
 public function setupAsDirector()
 {
     $this->director = User::where('email', DatabaseSeeder::DIRECTOR_EMAIL)->first();
     $this->season = Season::orderBy('id', 'DESC')->first();
     $this->actingAs($this->director)->withSession([SessionManager::SEASON => $this->season->toArray()]);
 }