本文整理汇总了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);
}
示例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;
}
示例3: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$provinces = Province::all();
return View::make('provinces.index', compact('provinces'));
}