/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $stateList = State::lists('name', 'name');
     $lgaList = lga::lists('name', 'name');
     $state = State::findorFail($id);
     $areas = $state->lgas->lists('name')->all();
     return view('admin/location/edit', compact('state', 'areas', 'stateList', 'lgaList'));
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     if ($request->has('filterBy')) {
         $questions = Question::with('state')->where($request->get('filterBy') . '_id', $request->get('id'))->get();
     } else {
         $questions = Question::orderBy('likes', 'desc')->with('state')->get();
     }
     $states = State::lists('name', 'id');
     return view('admin.questions.index', compact('questions', 'states'));
 }
Ejemplo n.º 3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['student'] = Student::find($id);
     $data['title'] = 'Edit ' . $data['student']->fname;
     $data['students_menu'] = 1;
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['parents'] = StudentParent::select(\DB::raw('concat (fname," ",lname) as full_name, id'))->lists('full_name', 'id')->prepend('Please Select');
     $data['classes'] = StudentClass::lists('name', 'id')->prepend('Please Select');
     $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select');
     return view('admin.students.edit', $data);
 }
Ejemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $states = State::lists('name', 'id');
     return view('index', compact('states'));
 }
Ejemplo n.º 5
0
 public function showLoginForm()
 {
     if (property_exists($this, 'loginView')) {
         return view($this->loginView);
     }
     if (view()->exists('auth.authenticate')) {
         return view('auth.authenticate');
     }
     $uf = State::lists('nome', 'uf');
     return view('auth.login', compact('uf'));
 }
Ejemplo n.º 6
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return view('students.index', ['students' => Student::all(), 'states' => State::lists('name', 'id'), 'sections' => Section::lists('name', 'id')]);
 }
Ejemplo n.º 7
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $biz = Biz::findorFail($id);
     $cat = $biz->cats->lists('id')->all();
     $sub = $biz->subcats->lists('id')->all();
     // dd($sub);
     $catList = Cat::lists('name', 'id');
     $subList = SubCat::lists('name', 'id');
     // dd($subList);
     $stateList = State::lists('name', 'id');
     $lgaList = Lga::lists('name', 'id');
     //$area= Address::lists
     //dd($biz->address->state->name);
     //  foreach ($biz->subcats as $sub) {
     //      $currentSubs[] = $sub->id;
     //  }
     //   if(empty($currentSubs)){
     //      $currentSubs = '';
     //  }
     return view('admin/biz/edit', compact('biz', 'catList', 'subList', 'stateList', 'cat', 'currentSubs', 'lgaList', 'sub'));
 }
Ejemplo n.º 8
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['title'] = 'Edit Staff';
     $data['staff'] = Staff::find($id);
     $data['staff_menu'] = 1;
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['staff_types'] = StaffType::lists('staff_type', 'id')->prepend('Please Select');
     return view('admin.staff.edit', $data);
 }
Ejemplo n.º 9
0
 /**
  * Edit the Child
  * @param  int $id 
  * @return \Illuminate\Http\Response
  */
 public function editChild($id)
 {
     $child = \App\Child::with('phones', 'address')->findOrFail($id);
     $groups = \App\AgeGroup::where('on_site', "=", 1)->where('published', "=", 1)->lists('name', 'id');
     $agegroup = \App\AgeGroup::find(1);
     $courses = $agegroup->courses;
     $states = \App\State::lists('name', 'id');
     return view('register.child', compact('child', 'groups', 'states'));
 }
Ejemplo n.º 10
0
 public function profile($userId)
 {
     $cats = Cat::all();
     $user = \App\User::findOrFail($userId);
     $bizs = $user->favours;
     $favourites = \DB::table('favourites')->whereUserId(\Auth::user()->id)->lists('biz_id');
     //$bizs = Biz::orderBy('created_at', 'desc')->paginate(6);
     $stateList = State::lists('name', 'name');
     $lgaList = Lga::lists('name', 'id');
     $catList = Cat::lists('name', 'name');
     $featured = Biz::whereFeatured('YES')->paginate(3);
     $recent = Biz::orderBy('created_at', 'desc')->paginate(2);
     // dd($featured);
     return view('pages.user-profile', compact('stateList', 'lgaList', 'catList', 'cats', 'bizs', 'user', 'favourites', 'featured', 'recent', 'totalBiz', 'totalCat'));
 }
Ejemplo n.º 11
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['parent'] = StudentParent::find($id);
     $data['parents_menu'] = 1;
     $data['title'] = 'Edit Parent';
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select');
     return view('admin.parents.edit', $data);
 }