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


PHP Language::all方法代码示例

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


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

示例1: edit

 public function edit($id)
 {
     $param['pageNo'] = 1;
     $result = DomainModel::find($id);
     $param['domain'] = $result;
     $param['language'] = LanguageModel::all();
     $param['template'] = TemplateModel::all();
     return View::make('domains.edit')->with($param);
 }
开发者ID:michaelotto126,项目名称:test_star,代码行数:9,代码来源:DomainController.php

示例2: saveFromArray

 /**
  * @param array $attributes
  */
 public function saveFromArray(array $attributes = array())
 {
     $this->model->save();
     $languages = Models\Language::all();
     foreach ($languages as $language) {
         $descriptions[$language->id] = array('name' => isset($attributes['name'][$language->id]) ? $attributes['name'][$language->id] : '');
     }
     $this->saveDescriptions($this->model, $descriptions, Models\OrdersStatusesDescription::class);
 }
开发者ID:procoders,项目名称:printrock,代码行数:12,代码来源:OrdersStatusRepository.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $fromWhere = Input::get('from', null);
     // Problem --------------------------------------------------
     $problem_id = Input::get('problem_id', '');
     // User -----------------------------------------------------
     $username = Input::get('user', '');
     // Result ---------------------------------------------------
     $resultRefs = Result::all();
     $result_id = Input::get('result_id', 0);
     // Language -------------------------------------------------
     $lang_id = Input::get('lang_id', 0);
     $langRefs = Language::all();
     $acceptCode = Result::acceptCode;
     $solutions = SolutionService::getSolutionsByOption(['problem_id' => $problem_id, 'username' => $username, 'lang_id' => $lang_id, 'result_id' => $result_id]);
     // $solutions = $solutions->paginateFrom(Input::get('top', ''), 20);
     //$solutions = $solutions->paginate(20, ['url' => \Request::url()]);
     $getUser_id = SolutionService::getUser();
     if ($getUser_id) {
         $getUser_id = $getUser_id->id;
     }
     return view('solutions.index', compact('fromWhere', 'solutions', 'problem_id', 'username', 'result_id', 'resultRefs', 'lang_id', 'langRefs', 'acceptCode', 'getUser_id'));
 }
开发者ID:joonas-yoon,项目名称:acm-oj,代码行数:28,代码来源:SolutionsController.php

示例4: _getAvailableLanguages

 /**
  * @return mixed
  */
 private function _getAvailableLanguages()
 {
     return !empty($this->supportedLanguages) ? $this->supportedLanguages : Models\Language::all();
 }
开发者ID:procoders,项目名称:printrock,代码行数:7,代码来源:LanguagesFields.php

示例5: showDefaultLanguage

 public function showDefaultLanguage()
 {
     $user = UserService::getUser();
     $defaults = ['language' => $user->default_language, 'code_theme' => $user->default_code_theme];
     $langs = Language::all();
     $themes = [['value' => 'chrome', 'name' => 'Chrome'], ['value' => 'clouds', 'name' => 'Clouds'], ['value' => 'crimson_editor', 'name' => 'Crimson Editor'], ['value' => 'dawn', 'name' => 'Dawn'], ['value' => 'dreamweaver', 'name' => 'Dreamweaver'], ['value' => 'eclipse', 'name' => 'Eclipse'], ['value' => 'github', 'name' => 'GitHub'], ['value' => 'iplastic', 'name' => 'IPlastic'], ['value' => 'solarized_light', 'name' => 'Solarized Light'], ['value' => 'textmate', 'name' => 'TextMate'], ['value' => 'tomorrow', 'name' => 'Tomorrow'], ['value' => 'xcode', 'name' => 'XCode'], ['value' => 'kuroir', 'name' => 'Kuroir'], ['value' => 'katzenmilch', 'name' => 'KatzenMilch'], ['value' => 'sqlserver', 'name' => 'SQL Server'], ['value' => 'ambiance', 'name' => 'Ambiance'], ['value' => 'chaos', 'name' => 'Chaos'], ['value' => 'clouds_midnight', 'name' => 'Clouds Midnight'], ['value' => 'cobalt', 'name' => 'Cobalt'], ['value' => 'idle_fingers', 'name' => 'idle Fingers'], ['value' => 'kr_theme', 'name' => 'krTheme'], ['value' => 'merbivore', 'name' => 'Merbivore'], ['value' => 'merbivore_soft', 'name' => 'Merbivore Soft'], ['value' => 'mono_industrial', 'name' => 'Mono Industrial'], ['value' => 'monokai', 'name' => 'Monokai'], ['value' => 'pastel_on_dark', 'name' => 'Pastel on dark'], ['value' => 'solarized_dark', 'name' => 'Solarized Dark'], ['value' => 'terminal', 'name' => 'Terminal'], ['value' => 'tomorrow_night', 'name' => 'Tomorrow Night'], ['value' => 'tomorrow_night_blue', 'name' => 'Tomorrow Night Blue'], ['value' => 'tomorrow_night_bright', 'name' => 'Tomorrow Night Bright'], ['value' => 'tomorrow_night_eighties', 'name' => 'Tomorrow Night 80s'], ['value' => 'twilight', 'name' => 'Twilight'], ['value' => 'vibrant_ink', 'name' => 'Vibrant Ink']];
     return $this->showSettings('language', compact('defaults', 'langs', 'themes'));
 }
开发者ID:joonas-yoon,项目名称:acm-oj,代码行数:8,代码来源:UsersController.php

示例6: getNewApp

 public function getNewApp()
 {
     $interviews = Interview::all();
     $mentors = Mentor::orderBy('name')->get();
     $languages = Language::all();
     $interests = Interest::all();
     $meetings = Meeting::all();
     $itemCount = 0;
     foreach ($interviews as $interview) {
         $numApps = count($interview->applications);
         if ($numApps == 0 || $numApps > 5) {
             unset($interviews[$itemCount]);
         }
         $itemCount++;
     }
     $application = new Application();
     $application->id = "new";
     $application->name = "new";
     $application->facebook = "http://www.facebook.com/";
     return view('pages.application', compact('interviews', 'mentors', 'languages', 'interests', 'meetings', 'application'));
 }
开发者ID:harrischristiansen,项目名称:Ignite,代码行数:21,代码来源:IgniteController.php

示例7: createSolution

 /**
  * This have been used as SolutionController::create
  *
  * @return \Illuminate\Http\Response
  */
 public function createSolution($id)
 {
     $problem = ProblemService::getProblem($id);
     if ($problem->status != 1) {
         // 공개문제(1) 가 아니면 제출이 불가함
         return abort(404);
     }
     $languages = Language::all()->toArray();
     array_unshift($languages, ['id' => 0, 'name' => '선택하세요']);
     $languages = array_pluck($languages, 'name', 'id');
     $defaults = ['language' => Sentinel::getUser()->default_language, 'code_theme' => Sentinel::getUser()->default_code_theme];
     return view('solutions.create', compact('problem', 'languages', 'defaults'));
 }
开发者ID:joonas-yoon,项目名称:acm-oj,代码行数:18,代码来源:ProblemsController.php

示例8: all

 /**
  * @SWG\Api(
  *   path="/language/all",
  *   @SWG\Operation(
  *     nickname="Get all languages",
  *     method="GET",
  *     summary="Find all languages",
  *     notes="Returns all languages",
  *     type="array",
  *     @SWG\Items("Language"),
  *     authorizations={}
  *   )
  * )
  */
 public function all()
 {
     $statusCode = 200;
     $response = [];
     $languageModels = Models\Language::all();
     foreach ($languageModels as $languageModel) {
         $languageView = new ModelViews\Language($languageModel);
         $response[] = $languageView->get();
     }
     return \Response::json($response, $statusCode);
 }
开发者ID:procoders,项目名称:printrock,代码行数:25,代码来源:LanguageController.php


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