本文整理汇总了PHP中Countries::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Countries::all方法的具体用法?PHP Countries::all怎么用?PHP Countries::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Countries
的用法示例。
在下文中一共展示了Countries::all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id = NULL)
{
$currUser = Auth::user();
$oCountries = Countries::all();
$aRegion = NULL;
foreach ($oCountries as $item) {
$aCountries[$item->id] = $item->name;
}
if ($id > 0) {
$aRegion = Regions::find($id);
}
if ($currUser->is_admin == 0) {
return Redirect::route('user-dashboard', array());
}
return View::make('/region/edit', array('aRegion' => $aRegion, 'aCountries' => $aCountries, 'currUser' => $currUser, 'id' => $id));
}
示例2: edit
/**
* Show the GET form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id = NULL)
{
$currUser = Auth::user();
$oCountries = Countries::all();
$oRegions = Regions::all();
$aCity = NULL;
foreach ($oCountries as $item) {
$aCountries[$item->name] = array();
$aRegions = Regions::where('country_id', '=', $item->id)->get();
foreach ($aRegions as $region) {
$aCountries[$item->name][$region->id] = $region->name;
}
}
if ($id > 0) {
$aCity = Cities::find($id);
}
if ($currUser->is_admin == 0) {
return Redirect::route('user-dashboard', array());
}
return View::make('/city/edit', array('aCity' => $aCity, 'aCountries' => $aCountries, 'oRegions' => $oRegions, 'currUser' => $currUser, 'id' => $id));
}
示例3: view_details
public function view_details()
{
$id = $this->input->get('emp_id');
$data['departments'] = Departments_model::all();
$data['job_titles'] = Job_titles_model::all();
$data['employment_type'] = Employment_type_model::all();
$data['countryy'] = Countries::all();
$data['user_level'] = View_user_level::all();
$data['record'] = Dependent_model::find('all', array('conditions' => "employee_id='{$id}'"));
//get dependents by id
$data['info'] = Emp_info_model::find($id);
//Tab 1a - Personal Tab
$data['gov_id'] = Gov_id_model::find($id);
//Tab 1b - Gov ID Tab
$data['address'] = View_emp_address::find($id);
//Tab 2a - Contact Tab
$data['contact'] = Emp_contact_model::find($id);
//Tab 2b - Contact Tab
$data['contactP'] = Emp_contact_person::find($id);
//Tab 2c - Contact Tab
$data['school'] = Emp_school_model::find($id);
//Tab 3 - School Tab
$data['job_hist'] = Job_history_model::find('all', array('conditions' => "employee_id ='{$id}'"));
//Tab 4 - Job History Tab
$data['emp'] = View_job_history::find($id);
//Tab 5 - Employment Tab
$data['leaves'] = View_leaves_left::find('all', array('conditions' => "employee_id ='{$id}'"));
//Tab 6 - Leaves Tab
$data['asset'] = View_assigned_assets_model::find('all', array('conditions' => "emp_id ='{$id}'"));
//Tab 7 - Asset Tab
$data['project'] = View_project_workers::find('all', array('conditions' => "emp_id ='{$id}'"));
//Tab 8 - Project Tab
$data['account'] = View_users_model::find_by_employee_id($id);
//Tab 9 - Users Tab
$data['pageTitle'] = 'Employee Details - MSInc.';
$data['content'] = 'employee/employee_details';
$this->load->view($this->master_layout, $data);
$this->display_notif();
}
示例4: edit
/**
* Show the GET form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id = NULL)
{
$currUser = Auth::user();
$oCountries = Countries::all();
$aCountry = NULL;
$aCountries['0'] = 'Root Node';
foreach ($oCountries as $item) {
$aCountries[$item->id] = $item->name;
}
if ($id > 0) {
$aCountry = Countries::find($id);
}
if ($currUser->is_admin == 0) {
return Redirect::route('user-dashboard', array());
}
return View::make('/country/edit', array('aCountry' => $aCountry, 'currUser' => $currUser, 'id' => $id));
}