/** * Display a listing of the resource. * * @return Response */ public function index() { $states = State::all(); $totalState = State::count(); // dd($state->name); return view('admin.location.index', compact('states', 'totalState')); }
public function locations() { $states = State::all(); $totalState = State::count(); $totalBiz = Biz::count(); $stateList = State::lists('name', 'name'); return view('pages.locations', compact('states', 'totalState', 'stateList', 'totalBiz')); }