/** * @param string $backUrl * @param int $club_id * @return \Illuminate\Http\RedirectResponse */ public function add($backUrl = 'home', $club_id = 0) { if ($club_id == 0) { return Redirect::route($backUrl); } $userclub = new Userclub(); $userclub->user_id = Confide::user()->id; $userclub->club_id = $club_id; $userclub->save(); return Redirect::route($backUrl); }
public function getListClubId() { // Liste des Clubs deja selectionnees pour cet Manager (user) return Userclub::whereUserId($this->id)->lists('club_id'); }