本文整理汇总了PHP中Forms::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::find方法的具体用法?PHP Forms::find怎么用?PHP Forms::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDone
public function getDone()
{
$leftout = array();
$k = 0;
for ($i = 1; $i < Input::get('count'); $i++) {
$code = Input::get('skill_' . $i);
$field = FormFields::where('unique_id', $code)->first();
if (!is_null($field)) {
$form_id = $field->form_id;
$form = Forms::find($form_id);
$form->to_org = "1";
$form->job_form_id = Input::get('job_form_id');
$form->save();
$data['status'] = 'success';
$k++;
$data['k'] = $k;
} else {
array_push($leftout, $code);
$data['leftout'] = $leftout;
$data['k'] = $k;
}
}
if ($k == 0) {
$data['status'] = 'error';
$data['k'] = $k;
}
return Response::json($data);
}
示例2: postGetPfTemplate
public function postGetPfTemplate($id)
{
$row = Forms::find($id);
echo $row->forms_content_text;
}
示例3: getSuccessCopySkill
public function getSuccessCopySkill($id = null)
{
$get = Input::all();
if (isset($get['uniqueid']) && $get['uniqueid']) {
$id = $get['uniqueid'];
}
if ($form = Forms::where('unique_id', $id)->where('status', 'active')->first()) {
$form = Forms::where('unique_id', $id)->where('status', 'active')->first();
$today = date("m-d-Y");
$deadline = $form->deadline;
if ($today > $deadline) {
return Redirect::back()->with('error', 'Sorry form is no more available');
}
$fields = FormFields::where('form_id', $form->id)->get();
$organization = 0;
$skillfields = array();
foreach ($fields as $field) {
foreach ($fields as $fld) {
if ($field->placeholder == $fld->label) {
if ($fld->type = 'skill') {
}
}
}
}
$applied_jobs = array();
if (Sentry::check()) {
$jobs_forms = Forms::where('to_org', "1")->where('status', 'active')->where('user_id', Sentry::getUser()->id)->get();
foreach ($jobs_forms as $jobs) {
$jform = Forms::find($jobs->job_form_id);
$applied_jobs[$jform->name] = $jobs->updated_at;
}
} else {
$applied_jobs = null;
}
return View::make('frontend/forms/skillcopysuccess', compact('form', 'fields', 'applied_jobs'));
}
// $organization=Sentry::getUser()->hasAccess('organization');
return Response::make(View::make('error/404'), 404);
}