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


PHP Results::find方法代码示例

本文整理汇总了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");
 }
开发者ID:sidis405,项目名称:s-opa,代码行数:8,代码来源:AdminResultsController.php

示例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');
 }
开发者ID:imranshuvo,项目名称:QuizzApps,代码行数:13,代码来源:AdminUsersController.php

示例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) {
开发者ID:taviroquai,项目名称:bootwiki,代码行数:31,代码来源:index.php

示例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);
 }
开发者ID:imranshuvo,项目名称:QuizzApps,代码行数:22,代码来源:AdminDashboardController.php


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