예제 #1
0
 public function search($input)
 {
     $query = Floor::query();
     $columns = Schema::getColumnListing('floors');
     $attributes = array();
     foreach ($columns as $attribute) {
         if (isset($input[$attribute]) and !empty($input[$attribute])) {
             $query->where($attribute, $input[$attribute]);
             $attributes[$attribute] = $input[$attribute];
         } else {
             $attributes[$attribute] = null;
         }
     }
     return [$query->get(), $attributes];
 }
예제 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $user = User::find($id);
     $floorno = Floor::lists('floor_no', 'floor_no');
     return view('apartmentadmin.edit', compact('user', 'floorno'));
 }