当前位置: 首页>>代码示例>>PHP>>正文


PHP Province::all方法代码示例

本文整理汇总了PHP中Province::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Province::all方法的具体用法?PHP Province::all怎么用?PHP Province::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Province的用法示例。


在下文中一共展示了Province::all方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMyprofile

 public function getMyprofile()
 {
     $id = Auth::user()->id;
     $alumni_id = null;
     $sql = "SELECT * FROM alumni WHERE account_id = ?";
     $prof = DB::select($sql, array($id));
     if ($prof != null) {
         $alumni_id = $prof[0]->id;
     }
     $sql2 = "SELECT * FROM degree WHERE alumni_id = ?";
     $deg = DB::select($sql2, array($alumni_id));
     $sql3 = "SELECT * FROM work_experience WHERE alumni_id = ?";
     $wrk_exp = DB::select($sql3, array($alumni_id));
     $sql4 = "SELECT * FROM certificate WHERE alumni_id = ?";
     $certificate = DB::select($sql4, array($alumni_id));
     // $sql5 = "SELECT * FROM alumni_tracer WHERE alumni_id = ?";
     $sql5 = "SELECT at.*, sq.question, sc.choice\n\t\t\t\tFROM alumni_tracer AS at\n\t\t\t\tINNER JOIN survey_questions AS sq\n\t\t\t\tON sq.id = at.question_id\n\t\t\t\tINNER JOIN survey_choices AS sc\n\t\t\t\tON sc.id = at.choice_id\n\t\t\t\tWHERE at.alumni_id = ?\n\t\t\t\tORDER BY at.question_id";
     $a_tracer = DB::select($sql5, array($alumni_id));
     $dept = Department::all();
     $region = Region::all();
     $province = Province::all();
     $occupation = Occupation::all();
     $company = Company::all();
     $deg_title = DegreeTitle::all();
     $school = School::all();
     $jobs = Job::all();
     $field = Field::all();
     $questions = DB::select("SELECT * FROM survey_questions");
     $civil_status = DB::select("SELECT * FROM civil_status");
     return View::make('user.profile')->with('company', $company)->with('field', $field)->with('occupation', $occupation)->with('work_exp', $wrk_exp)->with('degree', $deg)->with('a_tracer', $a_tracer)->with('certificate', $certificate)->with('school', $school)->with('deg_title', $deg_title)->with('profile', $prof)->with('dept', $dept)->with('region', $region)->with('province', $province)->with('civil_status', $civil_status)->with('questions', $questions)->with('jobs', $jobs);
 }
开发者ID:patocjurel,项目名称:capstone-project,代码行数:31,代码来源:UserController.php

示例2: profile

 public static function profile()
 {
     if (current_user_can('profile')) {
         $user_id = get_current_user_id();
         $usermeta = \UserMeta::where('user_id', $user_id)->first();
         $cities = self::idandname(\City::all(), "id", "name");
         $provinces = self::idandname(\Province::all(), "id", "name");
         $countries = self::idandname(\Country::all(), "id", "name");
         View::make("site/user/profile", compact('cities', 'provinces', 'countries', 'usermeta'));
         die;
     }
     wp_redirect("/login");
     exit;
 }
开发者ID:hasangilak,项目名称:wp-semi-laravel,代码行数:14,代码来源:UserController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $provinces = Province::all();
     return View::make('provinces.index', compact('provinces'));
 }
开发者ID:hendryguna,项目名称:laravel-basic,代码行数:10,代码来源:ProvincesController.php


注:本文中的Province::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。