public function getImage($id) { $team = AgentUser::where('agent_id', '=', $id)->get(); foreach ($team as $teams) { return $teams->agency_name; } }
public function getIndex($id) { $records = AgentUser::where('id', $id)->get(); foreach ($records as $record) { $agency_id = $record->id; } $records = Agency::where('agency_id', $agency_id)->get(); $total = DB::table('Agencystaff')->where('agency_id', $agency_id)->count(); return View::make('agencystaff.index')->with('record', $records)->with('total', $total); }
public function getDelete($id) { $agencystaff = AgentUser::find($id); $agencystaff->delete(); return Redirect::to('dashboard/agencies'); }