Exemplo n.º 1
0
 public function editcity()
 {
     $err = array();
     if ($_POST['_type'] == 3) {
         $model_city = model_ext_city::find($_POST['city_code']);
         $model_city->delete();
     } else {
         if ($_POST['_type'] == 1) {
             $model_city = new model_ext_city();
             $model_city->create($_POST);
         } else {
             if ($_POST['_type'] == 2) {
                 $model_city = model_ext_city::find($_POST['city_code_old']);
                 unset($_POST['city_code_old']);
                 $model_city->fill($_POST);
                 $model_city->save();
             }
         }
     }
     return redirect('/backend/city')->withErrors($err);
 }
 public function addBusiness()
 {
     $member_id = auth()->guard('member')->user()->member_id;
     $model_member = model_member::find($member_id);
     $model_bfield = model_business_field::all()->sortBy('bfield_name')->pluck('bfield_name', 'bfield_id')->toArray();
     $model_business_parent = model_business::where('business_status', '1')->orderBy('business_name')->pluck('business_name', 'business_id')->toArray();
     $model_business_parent = ['0' => 'No Parent'] + $model_business_parent;
     $model_ext_country = model_ext_country::all()->sortBy('country_name')->pluck('country_name', 'country_code')->toArray();
     $model_ext_city = model_ext_city::all()->sortBy('city_name')->pluck('city_name', 'city_code')->toArray();
     $model_building = model_building::all()->sortBy('building_name')->pluck('building_name', 'building_id')->toArray();
     return view('frontend.business.view_business_add')->with(['model_member' => $model_member, 'model_bfield' => $model_bfield, 'model_business_parent' => $model_business_parent, 'model_country' => $model_ext_country, 'model_building' => $model_building, 'model_city' => $model_ext_city]);
 }
Exemplo n.º 3
0
 public function index()
 {
     $model_member = model_member::where(array('member_status' => '1'))->get();
     $model_ext_city = model_ext_city::all()->sortBy('city_name')->pluck('city_name', 'city_code');
     return view('backend.member.index')->with(['model_member' => $model_member, 'model_city' => $model_ext_city]);
 }
 public function register()
 {
     $model_ext_city = model_ext_city::all()->pluck('city_name', 'city_code');
     return view('frontend.view_member_register')->with(['model_city' => $model_ext_city]);
 }
 public function index()
 {
     $model_building = model_building::where(array('building_status' => '1'))->get();
     $model_ext_city = model_ext_city::all()->sortBy('city_name')->pluck('city_name', 'city_code')->toArray();
     return view('backend.building.index')->with(['model_building' => $model_building, 'model_city' => $model_ext_city]);
 }