本文整理汇总了PHP中Results::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::find方法的具体用法?PHP Results::find怎么用?PHP Results::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results::find方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: destroy
public function destroy($id)
{
if (\Input::get('bulk_opa_items')) {
$result = Results::find(Input::get('bulk_opa_items')[0]);
$result->delete();
}
return Redirect::to("/admin/surveys/" . $id . "/results");
}
示例2: getTestagain
public function getTestagain($userId = 0)
{
$result = Results::where('user_id', $userId)->first();
$result = Results::find($result['id']);
//return $result->active;
if ($result->active == 0) {
$result->active = 1;
} elseif ($result->active == 1) {
$result->active = 0;
}
$result->save();
return Redirect::to('backends/users');
}
示例3: function
/*
* Change idiom
*/
$app->get('/idiom/:idiom', function ($idiom) use($app) {
BootWiki::setIdiom($idiom);
$app->redirect(BASEURL);
});
/*
* Display search results
*/
$app->get('/search', function () use($app) {
// load query
$q = $app->request()->get('q');
// Process results
$main = new Results();
$main->find($q);
// Load layout
$layout = new Layout($main);
$layout->loadRecent();
$layout->loadPopular();
$layout->query = $q;
// Print layout
$app->response()->body((string) $layout);
});
/*
* Display content
*/
$app->get('/:alias', function ($alias) use($app) {
$content = new Content();
$content = $content->load($alias);
if (!$content) {
示例4: getViewresult
public function getViewresult()
{
$result = Results::where('user_id', Auth::user()->id)->first();
$result = Results::find($result['id']);
$data['pageTitle'] = "Quizzler | Dashboard";
$data['urlAddBack'] = "backends/dashboard";
$data['btnAddBack'] = '<i class="icon-reply"></i><span>Back<span>';
$data['labelPage'] = "The Quizzler Result";
$data['questions'] = Question::orderBy('id', 'desc')->get();
$data['formOrigin'] = 'quizz';
$data['activeD'] = 'active';
$result = Results::where('user_id', Auth::user()->id)->first();
$result = Results::find($result['id']);
$data['resultActive'] = $result->active;
if ($result->score >= 50) {
$data['resultScore'] = " Your scored " . $result->score . " %, You Passed.";
} else {
$data['resultScore'] = " Your scored " . $result->score . " %, You Failed.";
}
$data['resultQuestionId'] = json_decode($result->question_quizzler_answer);
return View::make('backends.dashboard.result', $data);
}