public function ShowBranchProfile($id, $branchid)
 {
     $update = PartnerBranch::where('id', $branchid)->first();
     $countries = Country::all();
     $partnerid = Partner::find($id);
     return view('deskpad/updatebranch', compact('update', 'partnerid', 'countries'));
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $countries = \App\Country::all();
     foreach ($countries as $country) {
         echo "DB::table('country')->insert(['cc_fips' => '{$country->cc_fips}','cc_iso' => '{$country->cc_iso}','cc_tld' => '{$country->cc_tld}','country_name' => '{$country->country_name}',]); \n";
     }
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $player = Player::find($id);
     $seasons = Season::all();
     $positions = Position::all();
     $countries = Country::all();
     return view('admin.players.edit', compact('player', $player, 'seasons', $seasons, 'positions', $positions, 'countries', $countries));
 }
 public function ShowUpdateContacts($id, $branchid)
 {
     $updatecontact = PartnerContact::where('id', $branchid)->first();
     $countries = Country::all();
     $citizenships = Citizenship::all();
     $partnertitles = Partnertitle::all();
     $partnerid = Partner::find($id);
     return view('deskpad/updatecontact', compact('updatecontact', 'partnerid', 'countries', 'citizenships', 'partnertitles'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $statusCode = 200;
     $response = ['countries' => []];
     $countries = Country::all();
     foreach ($countries as $country) {
         $response['countries'][] = ['id' => $country->id, 'country' => $country->country];
     }
     return response($response, $statusCode);
 }
示例#6
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $countries = \App\Country::all()->lists('name', 'id');
     $state = \App\State::find($id);
     if ($state) {
         return view('states.edit', ['state' => $state, 'countries' => $countries]);
     }
     flash()->error('State does not exist.');
     return \Redirect::back();
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  *
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $city = City::findOrFail($id);
     $country = Country::all();
     $language = Language::all();
     $languages_cur = $city->language;
     foreach ($languages_cur as $language_cur) {
         $lang[] = $language_cur['id'];
     }
     return view('editCity', ['id' => $id, 'city' => $city->city, 'country_cur' => $city->country_id, 'languages_cur' => $lang, 'countries' => $country, 'languages' => $language]);
 }
示例#8
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $title = 'CONFIG';
     $country = Country::all()->sortBy('country');
     $designation = Designation::all()->sortBy('designation');
     $city = City::all()->sortBy('city');
     $state = State::all()->sortBy('state');
     $brands = Brands::all()->sortBy('brand');
     $models = Models::all()->sortBy('model');
     $businessType = BusinessType::all()->sortBy('name');
     return view('myConfig.index', compact('title', 'country', 'designation', 'city', 'state', 'brands', 'models', 'businessType'));
 }
示例#9
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     if ($this->option('all')) {
         foreach (Country::all() as $country) {
             $country->import();
             sleep(5);
         }
     } elseif ($this->argument('country')) {
         $country = Country::find($this->argument('country'));
         if (count($country)) {
             $country->import();
         }
     }
 }
示例#10
0
 /**
  * Returns a view for editing various details about a specific user
  *
  * @param $name Node 'name' label to match when editing a user
  * @return $this
  */
 public function edit($name)
 {
     $user = User::whereName($name)->first();
     $groups = Group::all(['id', 'name']);
     $groupList = array();
     foreach ($groups as $group) {
         $groupList[$group->id] = $group->name;
     }
     $countries = Country::all(['id', 'name']);
     $countryList = array();
     foreach ($countries as $country) {
         $countryList[$country->id] = $country->name;
     }
     return view('admin.users.edit', compact('user'))->with('groupList', $groupList)->with('countryList', $countryList);
 }
示例#11
0
 public function newArt()
 {
     $getEra = Era::all();
     foreach ($getEra as $Era) {
         $eras[$Era->id] = $Era->name;
     }
     $getStyle = Style::all();
     foreach ($getStyle as $Style) {
         $styles[$Style->id] = $Style->name;
     }
     $getCountry = Country::all();
     foreach ($getCountry as $Country) {
         $countrys[$Country->name] = $Country->name;
     }
     return view('art.new', compact('styles', 'eras', 'countrys'));
 }
 public function playerCountry(Request $request)
 {
     $this->validate($request, ['country_title' => 'required']);
     //dd($request->all());
     if ($request->file('ajax-country-flag')) {
         // $this->validate($request,['ajax-country-flag'=>'required|image|mimes:jpeg,jpg,png,bmp,gif,svg']);
         $file = $request->file('ajax-country-flag');
         $path = $this->_country_flag_path;
         $name = uniqid() . $file->getClientOriginalName();
         $file->move($path, $name);
     }
     $country = new Country(array('title' => $request->get('country_title'), 'flag_name' => $name, 'flag_path' => $path));
     $country->save();
     $countries = Country::all();
     return response()->json($countries);
 }
示例#13
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create($company_id)
 {
     $company = Company::find($company_id);
     $countries = Country::all();
     foreach ($countries as $ctr) {
         $country_names[$ctr->id] = $ctr->name;
     }
     $cities = City::all();
     foreach ($cities as $ct) {
         $city_names[$ct->id] = $ct->name;
     }
     foreach (Language::all() as $lang) {
         $langs[$lang->id] = $lang->name;
     }
     return view('jobs.create', compact('country_names', 'city_names', 'langs', 'company'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     try {
         $statusCode = 200;
         //			$response = [
         //				'Countries List'  => []
         //			];
         $countries = Country::all();
         foreach ($countries as $country) {
             //
             $response['Country List'][] = ['id' => $country->id, 'Country' => $country->country];
         }
         //			$response=$gender;
     } catch (Exception $e) {
         $statusCode = 400;
     } finally {
         return Response::json($response, $statusCode);
     }
 }
示例#15
0
 /**
  * Get all titles and return a simple array for dropdown list.
  *
  *
  * @return array $titleArray
  */
 public function getAllForDropdown()
 {
     $countries = Country::all();
     return Helper::getDropdownArray($countries);
 }
示例#16
0
 /**
  * redirect user to view the pageredirect
  * @param  integer $id
  * @return Response
  */
 public function editShowProfile($id)
 {
     //authorization
     if (!$this->adminAuth() && !$this->companyAuth(Auth::User()->id)) {
         return view('errors.404');
     }
     $countries = Country::all();
     $company = Company::find($id);
     return view('companies.editprofile', compact('company', 'countries'));
 }
示例#17
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function editCompanyExhibitor($id)
 {
     //
     $countries = Country::all();
     $exhibitor = Exhibitor::find($id);
     //authorization
     if (!$this->adminAuth() && !$this->companyAuth($exhibitor->company->user->id)) {
         return view('errors.404');
     }
     return view('exhibitors.editcompanyexhibitor', compact('exhibitor', 'countries'));
 }
示例#18
0
 /**
  * Create a new user using register page.
  *
  */
 public function createRegister()
 {
     $countries = Country::all();
     $interests = Interest::all();
     return view('index', compact('countries', 'interests'));
 }
示例#19
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $countries = Country::all();
     return view('adventures.create')->with('countries', $countries);
 }
 /**
  * @api {get} /countries Return the countries list
  * @apiSampleRequest http://api.world.com.ar/countries
  * @apiVersion 0.1.0
  * @apiName GetCountries
  * @apiGroup Country
  *
  * @apiDescription Retrieve the countries list from the database
  *
  * @apiExample Example usage (To test it, please, see the form at the end of this page):
  * curl -i http://api.world.com.ar/countries
  *
  * @apiSuccess {Object[]} countries              List of Countries (Array of Objects).
  * @apiSuccess {String}   countries.cc_fips      FIPS 10-4 Primary Country Code. A two alphabetic character FIPS 10-4 Primary Country Code uniquely identifying a geopolitical entity.
  * @apiSuccess {String}   countries.cc_iso       ISO 3166-1 alpha-2 – two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).
  * @apiSuccess {String}   countries.cc_tld       Country code top-level domain (ccTLD) is an Internet top-level domain generally used or reserved for a country, a sovereign state, or a dependent territory.
  * @apiSuccess {String}   countries.country_name Country name human readable format.
  *
  * @apiError (Error 5xx) InternalError Something was wrong, could be the container's configuration.
  *
  * @apiErrorExample Response (example):
  *     HTTP/1.1 500 Internal Error
  *     {
  *       "error": "InternalError"
  *     }
  */
 public function getCountries()
 {
     $countries = \App\Country::all(["cc_fips", "cc_iso", "cc_tld", "country_name"]);
     return response()->json($countries->toArray());
 }
示例#21
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Request $request)
 {
     //$sales = Sale::with ( 'user', 'country' )->orderBy ( 'id', 'desc' )->get ();
     $sales = Sale::with('user', 'country', 'values')->orderBy('id', 'desc');
     $flag = 0;
     $arr_Request = [];
     if ($request['user_id'] != null) {
         $arr_Request['user_id'] = $request['user_id'];
         $flag = 1;
         $sales = $sales->where('user_id', $arr_Request['user_id']);
     } else {
         $arr_Request['user_id'] = null;
     }
     if ($request['customer_name'] != null) {
         $arr_Request['customer_name'] = $request['customer_name'];
         $sales = $sales->where('customer_name', $arr_Request['customer_name']);
         $flag = 1;
     } else {
         $arr_Request['customer_name'] = null;
     }
     if ($request['country_id'] != null) {
         $arr_Request['country_id'] = $request['country_id'];
         $sales = $sales->where('country_id', $arr_Request['country_id']);
         $flag = 1;
     } else {
         $arr_Request['country_id'] = null;
     }
     if ($request['region'] != null) {
         $arr_Request['region'] = $request['region'];
         $sales = $sales->where('region', $arr_Request['region']);
         $flag = 1;
     } else {
         $arr_Request['region'] = null;
     }
     if ($request['vertical'] != null) {
         $arr_Request['vertical'] = $request['vertical'];
         $sales = $sales->where('vertical', $arr_Request['vertical']);
         $flag = 1;
     } else {
         $arr_Request['vertical'] = null;
     }
     if ($request['delivery_location'] != null) {
         $arr_Request['delivery_location'] = $request['delivery_location'];
         $sales = $sales->where('delivery_location', $arr_Request['delivery_location']);
         $flag = 1;
     } else {
         $arr_Request['delivery_location'] = null;
     }
     if ($request['engagement'] != null) {
         $arr_Request['engagement'] = $request['engagement'];
         $sales = $sales->where('engagement', $arr_Request['engagement']);
         $flag = 1;
     } else {
         $arr_Request['engagement'] = null;
     }
     if ($request['service'] != null) {
         $arr_Request['service'] = $request['service'];
         $sales = $sales->where('service', $arr_Request['service']);
         $flag = 1;
     } else {
         $arr_Request['service'] = null;
     }
     $currentYear = date("Y");
     if ($request['year'] != null) {
         $arr_Request['year'] = $request['year'];
         $currentYear = $arr_Request['year'];
         $flag = 1;
     } else {
         $arr_Request['year'] = null;
     }
     if ($request['q'] != null) {
         $arr_Request['q'] = $request['q'];
     } else {
         $arr_Request['q'] = null;
     }
     $arr_Request['flag'] = $flag;
     $years = Sale::getYear();
     $sales = $sales->get();
     $totals = [];
     $hc1 = $hc2 = $hc3 = $hc4 = $hc5 = $hc6 = $hc7 = $hc8 = $hc9 = $hc10 = $hc11 = $hc12 = 0;
     $v1 = $v2 = $v3 = $v4 = $v5 = $v6 = $v7 = $v8 = $v9 = $v10 = $v11 = $v12 = 0;
     $total_hc = 0;
     $total_value = 0;
     foreach ($sales as $key => $sale) {
         $total_hc += $sale->head_count;
         $total_value += $sale->value;
         $value = [];
         if ($request['q'] != null && $request['q'] == 'full') {
             $value = Sale::makeFullValue($sale, $currentYear);
         } elseif ($request['q'] != null && $request['q'] == 'weighted') {
             $value = Sale::makeWeightedValue($sale, $currentYear);
         } else {
             $value = Sale::makeFullValue($sale, $currentYear);
         }
         $total_val_hc = $total_val_value = 0;
         foreach ($value as $val) {
             $total_val_hc += $val['hc'];
             $total_val_value += $val['value'];
         }
         if ($total_val_hc == 0 && $total_val_value == 0) {
             unset($sales[$key]);
             $sale->success = false;
         }
         $sale->months = $value;
         $hc1 += $sale->months[0]['hc'];
         $hc2 += $sale->months[1]['hc'];
         $hc3 += $sale->months[2]['hc'];
         $hc4 += $sale->months[3]['hc'];
         $hc5 += $sale->months[4]['hc'];
         $hc6 += $sale->months[5]['hc'];
         $hc7 += $sale->months[6]['hc'];
         $hc8 += $sale->months[7]['hc'];
         $hc9 += $sale->months[8]['hc'];
         $hc10 += $sale->months[9]['hc'];
         $hc11 += $sale->months[10]['hc'];
         $hc12 += $sale->months[11]['hc'];
         $v1 += $sale->months[0]['value'];
         $v2 += $sale->months[1]['value'];
         $v3 += $sale->months[2]['value'];
         $v4 += $sale->months[3]['value'];
         $v5 += $sale->months[4]['value'];
         $v6 += $sale->months[5]['value'];
         $v7 += $sale->months[6]['value'];
         $v8 += $sale->months[7]['value'];
         $v9 += $sale->months[8]['value'];
         $v10 += $sale->months[9]['value'];
         $v11 += $sale->months[10]['value'];
         $v12 += $sale->months[11]['value'];
     }
     array_push($totals, array('hc' => $hc1, 'value' => $v1));
     array_push($totals, array('hc' => $hc2, 'value' => $v2));
     array_push($totals, array('hc' => $hc3, 'value' => $v3));
     array_push($totals, array('hc' => $hc4, 'value' => $v4));
     array_push($totals, array('hc' => $hc5, 'value' => $v5));
     array_push($totals, array('hc' => $hc6, 'value' => $v6));
     array_push($totals, array('hc' => $hc7, 'value' => $v7));
     array_push($totals, array('hc' => $hc8, 'value' => $v8));
     array_push($totals, array('hc' => $hc9, 'value' => $v9));
     array_push($totals, array('hc' => $hc10, 'value' => $v10));
     array_push($totals, array('hc' => $hc11, 'value' => $v11));
     array_push($totals, array('hc' => $hc12, 'value' => $v12));
     $users = User::all();
     $countries = Country::all();
     $customerNames = Sale::getCustomerName();
     return view('fulls.index')->with('sales', $sales)->with('totals', $totals)->with('years', $years)->with('users', $users)->with('countries', $countries)->with('arr_Request', $arr_Request)->with('customerNames', $customerNames)->with('total_hc', $total_hc)->with('total_value', $total_value);
 }
 /**
  * Get countries list
  *
  * @return view
  */
 public function index()
 {
     $countries = Country::all();
     return view('filter', ['countries' => $countries]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //authorization
     if (!$this->adminAuth() && !$this->userAuth(Auth::User()->id)) {
         return view('errors.404');
     }
     $interests = Interest::all();
     $countries = Country::all();
     $user = Generalinfo::where('user_id', $id)->get();
     $userinterest = UserInterest::where('user_id', $id)->get()->toArray();
     $userinterest = array_pluck($userinterest, 'interest_id');
     $this->data['userinterest'] = $userinterest;
     // $data['userinterest']= $userinterest
     return view('generalinfos.edit', compact('user', 'interests', 'countries'), $this->data);
 }
示例#24
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param int $id        	
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $sale = Sale::findOrFail($id);
     $sale->load('user', 'country', 'values');
     $users = User::all();
     $countries = Country::all();
     return view('sales.edit')->with('sale', $sale)->with('users', $users)->with('countries', $countries);
 }
 public function createcompanybyadmin()
 {
     $countries = Country::all();
     return view('AdminCP.companies.create', compact('countries'));
 }
示例#26
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function adminIndex()
 {
     $services = Service::join('countries', 'services.country_id', '=', 'countries.id')->select('services.id', 'services.name', 'min_process', 'max_process', 'countries.name as country', 'services.country_id')->orderBy('services.min_process')->get();
     return View('admin.services', ['services' => $services, 'countries' => Country::all()]);
 }
示例#27
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $countries = Country::all();
     return view('admin.country.index', compact('countries'));
 }
示例#28
0
 /**
  * Display list of Country from Storage
  * @return static
  */
 public function country()
 {
     return Country::all()->lists('country', 'country');
 }
 public function settings()
 {
     if (Session::has('user')) {
         $aLoggedInUser = null;
         $bOwner = true;
         $oMate = null;
         $bLoggedInUser = Session::has('user');
         if ($bLoggedInUser) {
             /*if($oUser->toArray()['id'] == Session::get('user')['id']){
                   $bOwner = true;
               }*/
             $aLoggedInUser['user'] = User::where('id', Session::get('user')['id'])->first()->toArray();
             $aLoggedInUser['current_character'] = Character::where('id', $aLoggedInUser['user']['current_character_id'])->first()->toArray();
         }
         $aUser['user'] = User::where('id', Session::get('user')['id'])->first()->toArray();
         $aUser['active_characters'] = Character::where('user_id', $aUser['user']['id'])->where('status', Character::CHARACTER_STATUS_DEFAULT)->orWhere('status', Character::CHARACTER_STATUS_ENABLED_BY_USER)->orWhere('status', Character::CHARACTER_STATUS_ENABLED_BY_ADMIN)->get()->toArray();
         $aUser['inactive_characters'] = Character::where('user_id', $aUser['user']['id'])->where('status', Character::CHARACTER_STATUS_DISABLED_BY_USER)->orWhere('status', Character::CHARACTER_STATUS_INACTIVE)->get()->toArray();
         $aUser['current_character'] = Character::where('id', $aUser['user']['current_character_id'])->first()->toArray();
         $aUser['user_settings'] = UserSetting::where('id', Session::get('user')['id'])->first()->toArray();
         $aLoggedInUser['user'] = $aUser['user'];
         $aLoggedInUser['current_character'] = $aUser['current_character'];
         $aCountries = Country::all()->toArray();
         return view('users.users.settings')->with('aUser', $aUser)->with('aLoggedInUser', $aLoggedInUser)->with('aCountries', $aCountries)->with('bLoggedInUser', $bLoggedInUser)->with('bOwner', $bOwner);
     }
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //authorization
     if (!$this->adminAuth() && !$this->userAuth(Auth::User()->id)) {
         return view('errors.404');
     }
     $interests = Interest::all();
     $countries = Country::all();
     $user = Generalinfo::where('user_id', $id)->get();
     $userinterest = UserInterest::where('user_id', $id)->get();
     return view('generalinfos.edit', compact('user', 'interests', 'countries', 'userinterest'));
 }