Esempio n. 1
0
 public function old()
 {
     $d['active'] = SwcCompetition::active()->get();
     $d['upcoming'] = SwcCompetition::upcoming()->get();
     $d['archived'] = SwcCompetition::archived()->get();
     $d['teams'] = SwcTeam::all();
     $d['members'] = Member::all();
     $d['skills'] = ['overall', 'attack', 'defence', 'strength', 'constitution', 'ranged', 'prayer', 'magic', 'cooking', 'woodcutting', 'fletching', 'fishing', 'firemaking', 'crafting', 'smithing', 'mining', 'herblore', 'agility', 'thieving', 'slayer', 'farming', 'runecrafting', 'hunter', 'construction', 'summoning', 'dungeoneering', 'divination'];
     return view('admin.swc.old', $d);
     // Display list of Swcs
 }
Esempio n. 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $members = Member::all();
     $time = Carbon::now()->second(0);
     $members->each(function ($member) use($time) {
         $results = $this->eoc->stats($member->display_name);
         if ($results === false) {
             return;
             // Skip to next member
         }
         $stats = ['created_at' => $time, 'updated_at' => $time];
         $this->api->getSkills()->each(function ($skill) use(&$stats, $results) {
             $stats[$skill->get('name') . '_rank'] = $results->get($skill->get('name'))->get('rank');
             $stats[$skill->get('name') . '_level'] = $results->get($skill->get('name'))->get('level');
             $stats[$skill->get('name') . '_xp'] = $results->get($skill->get('name'))->get('xp');
         });
         $member->stats()->create($stats);
     });
 }
Esempio n. 3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  \Clan\Models\Event  $event
  * @return Response
  */
 public function edit(Event $event)
 {
     $d['event'] = $event;
     $d['members'] = Member::all()->pluck('display_name', 'id');
     return view('admin.event.edit', $d);
 }
Esempio n. 4
0
 /**
  * Display a listing of the resource
  *
  * @return Response
  */
 public function index()
 {
     $d['members'] = Member::all();
     return view('admin.member.index', $d);
 }
Esempio n. 5
0
 public function members()
 {
     $d['members'] = Member::all();
     return view('site.members', $d);
 }
Esempio n. 6
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  \Clan\Models\PYPSeason  $season
  * @param  \Clan\Models\PYPCompetition  $comp
  * @return Response
  */
 public function edit(SwcSeason $season, SwcCompetition $comp)
 {
     $skills = new Skills();
     $d = ['season' => $season, 'comp' => $comp, 'members' => Member::all()->pluck('display_name', 'id'), 'skills' => $skills->pluck('name', 'id')];
     return view('admin.swc.competition.edit', $d);
 }