public function getCreditLimit() { if (Entrust::hasRole('Admin')) { $agents = Agent::all(); return View::make('accounts.credit-limit', compact('agents')); } return View::make('accounts.credit-limit'); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $agents = $this->agent->all(); return View::make('admin.agents.index', compact('agents')); }
/** * Display a listing of agents * * @return Response */ public function index() { $agents = Agent::all(); return View::make('control-panel.agents.index', compact('agents')); }
public function getProfile() { if (Entrust::hasRole('Agent')) { $agent = Agent::where('user_id', Auth::id())->first(); return View::make('account.profile.edit', compact('agent')); } elseif (Entrust::hasRole('Admin')) { $agents = Agent::all(); return View::make('account.profile.agent-list', compact('agents')); } }