public function test_get_paragon_gets_correct_seasonal_hardcore_paragon_level() { $member = new Member(); $member->paragon_curr_season_hc = 50; $paragon = $member->getParagon(true, true); $this->assertEquals(50, $paragon); }
/** * Execute the console command. * * @return mixed */ public function fire() { $members = Member::all(); foreach ($members as $member) { $command = new MemberUpdate($member); $command->handle(); } }
public function deleteMember($id) { try { $member = Member::where('id', $id)->firstOrFail(); } catch (\Exception $e) { return response('Bad Request.', 400); } /* Is Admin? */ $user = Auth::user(); if (!$user->isAdmin()) { return response('Unauthorized', 401); } $member->delete(); }
/** * Member listing * @return \Illuminate\View\View */ public function members() { $data = ['user' => Auth::user(), 'sitename' => \Config::get('diablo.sitename'), 'fields' => ['name' => ['type' => 'text', 'min' => 2, 'max' => 30], 'battletag' => ['type' => 'text', 'min' => 4, 'max' => 20]], 'endpoint' => \URL::route('member.post'), 'container' => 'memberForm', 'success' => "location.reload();", 'button' => 'addMember', 'title' => 'Add Member', 'members' => Member::all()]; return view('admin/members/index', $data); }