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


PHP Language::all方法代码示例

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


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

示例1: getCreate

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function getCreate()
 {
     $languages = Language::all();
     $language = "";
     // Show the page
     return view('admin.objecttype.create_edit', compact('languages', 'language'));
 }
开发者ID:Avimunk,项目名称:jini_1,代码行数:12,代码来源:ObjectTypesController.php

示例2: edit

 public function edit($id)
 {
     if (Request::isMethod('get')) {
         $roles = UserRole::orderBy('id', 'desc')->get();
         $info = User::find($id);
         $cats = BlogCategory::where('lang_code', $info->userblog->lang_code)->get();
         $langs = Language::all();
         return view('admin.users.edit', array('cats' => $cats, 'langs' => $langs, 'info' => $info, 'roles' => $roles));
     }
     // POST
     parse_str(Request::input('data'));
     $category_save = implode(',', $category);
     $u = User::find($id);
     $u->name = $name;
     $u->address = $address;
     $u->zipcode = $zipcode;
     $u->city = $city;
     $u->phone = $phone;
     $u->cpr = $cpr;
     $u->role = $role;
     $u->account_number = $account_number;
     if ($password != null || $password != '') {
         $u->password = Hash::make($password);
     }
     $u->save();
     $info_update = array('blogname' => $blogname, 'domain' => $blogurl, 'lang_code' => $lang_code, 'blog_categories' => $category_save);
     UserBlog::where('user_id', $id)->update($info_update);
 }
开发者ID:namcoder,项目名称:Topshare,代码行数:28,代码来源:UserController.php

示例3: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id)
 {
     $photoalbum = PhotoAlbum::find($id);
     $language = $photoalbum->language_id;
     $languages = Language::all();
     return view('backend.photoalbum.create_edit', compact('photoalbum', 'languages', 'language'));
 }
开发者ID:Rotron,项目名称:laravel5-shop,代码行数:13,代码来源:PhotoAlbumController.php

示例4: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id)
 {
     $videoalbum = VideoAlbum::find($id);
     $language = $videoalbum->language_id;
     $languages = Language::all();
     return view('admin.videoalbum.create_edit', compact('videoalbum', 'languages', 'language'));
 }
开发者ID:nickeblewis,项目名称:Laravel-5-Bootstrap-3-Starter-Site,代码行数:13,代码来源:VideoAlbumController.php

示例5: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id)
 {
     $newscategory = ArticleCategory::find($id);
     $language = $newscategory->language_id;
     $languages = Language::all();
     return view('backend.newscategory.create_edit', compact('newscategory', 'languages', 'language'));
 }
开发者ID:Rotron,项目名称:laravel5-shop,代码行数:13,代码来源:ArticleCategoriesController.php

示例6: getLanguages

 /**
  * JSON data for seeding Languages
  * @return \Illuminate\Http\JsonResponse
  * @throws \Exception
  */
 public function getLanguages()
 {
     return Datatable::collection(Language::all())->showColumns('title', 'code')->addColumn('updated_at', function ($model) {
         return $model->updated_at->diffForHumans();
     })->addColumn('', function ($model) {
         return get_ops('language', $model->id);
     })->searchColumns('title')->orderColumns('title', 'code')->make();
 }
开发者ID:santoshpawar,项目名称:laravel-5-simple-cms,代码行数:13,代码来源:DataTableController.php

示例7: getEdit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function getEdit($id)
 {
     $news = Article::find($id);
     $languages = Language::all();
     $language = $news->language_id;
     $newscategories = ArticleCategory::all();
     $newscategory = $news->newscategory_id;
     return view('admin.news.create_edit', compact('news', 'languages', 'language', 'newscategories', 'newscategory'));
 }
开发者ID:nickeblewis,项目名称:Laravel-5-Bootstrap-3-Starter-Site,代码行数:15,代码来源:ArticlesController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $statusCode = 200;
     $response = ['languages' => []];
     $languages = Language::all();
     foreach ($languages as $language) {
         $response['languages'][] = ['id' => $language->id, 'language' => $language->language];
     }
     return response($response, $statusCode);
 }
开发者ID:mudragel,项目名称:matematika-test.loc,代码行数:15,代码来源:LanguageController.php

示例9: search

 public function search(Request $request)
 {
     // retrieve query from URL
     $q = $request->q;
     // SQL LIKE format for matching on search query:
     // %SEARCH_TERM%
     $q_query = '%' . $q . '%';
     $questions = Question::where('title', 'LIKE', $q_query)->orWhere('description', 'LIKE', $q_query)->orWhere('code', 'LIKE', $q_query)->get();
     return view('questions.search', ['q' => $q, 'questions' => $questions, 'languages' => Language::all()]);
 }
开发者ID:alexpcoleman,项目名称:fitl,代码行数:10,代码来源:QuestionController.php

示例10: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  *
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $city = City::findOrFail($id);
     $country = Country::all();
     $language = Language::all();
     $languages_cur = $city->language;
     foreach ($languages_cur as $language_cur) {
         $lang[] = $language_cur['id'];
     }
     return view('editCity', ['id' => $id, 'city' => $city->city, 'country_cur' => $city->country_id, 'languages_cur' => $lang, 'countries' => $country, 'languages' => $language]);
 }
开发者ID:mudragel,项目名称:matematika-test.loc,代码行数:18,代码来源:CityController.php

示例11: showUserProfile

 public function showUserProfile()
 {
     $user = User::getUserProfile();
     $languages = Language::all();
     if ($user['status'] != '200') {
         return Render::errorPage($user['status']);
     }
     //if error
     $countries = Country::getAll();
     return view('backend.user.profile')->with('content_title', 'My Profile')->with('languages', $languages)->with('countries', $countries)->with('user_info', $user['data']['user_info'])->with('user_role', $user['data']['user_role']);
 }
开发者ID:vampirethura,项目名称:modelvillage,代码行数:11,代码来源:ProfileController.php

示例12: edit

 public function edit($id)
 {
     if (Request::isMethod('get')) {
         $lang = Language::all();
         $info = BlogCategory::find($id);
         return view('admin.blogcategories.edit', array('lang' => $lang, 'info' => $info));
     }
     $data = Request::all();
     $c = BlogCategory::find($id);
     $c->name = $data['name'];
     $c->lang_code = $data['lang_code'];
     $c->save();
     return redirect('admin/blog-categories')->with('ok', 'Saved');
 }
开发者ID:namcoder,项目名称:Topshare,代码行数:14,代码来源:BlogCategoryController.php

示例13: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create($company_id)
 {
     $company = Company::find($company_id);
     $countries = Country::all();
     foreach ($countries as $ctr) {
         $country_names[$ctr->id] = $ctr->name;
     }
     $cities = City::all();
     foreach ($cities as $ct) {
         $city_names[$ct->id] = $ct->name;
     }
     foreach (Language::all() as $lang) {
         $langs[$lang->id] = $lang->name;
     }
     return view('jobs.create', compact('country_names', 'city_names', 'langs', 'company'));
 }
开发者ID:AlSt2015,项目名称:jobs4creative,代码行数:21,代码来源:JobController.php

示例14: index

 public function index()
 {
     if (Request::isMethod('get')) {
         $lang = Language::all();
         $settings = Setting::all();
         return view('admin.settings.index', array('langs' => $lang, 'settings' => $settings));
     }
     /// POST
     $data = Request::all();
     $s = new Setting();
     $s->name = $data['name'];
     $s->lang_code = $data['lang_code'];
     $s->value = $data['value'];
     $s->type = 'var';
     $s->save();
     return redirect('admin/settings');
 }
开发者ID:namcoder,项目名称:Topshare,代码行数:17,代码来源:SettingsController.php

示例15: index

 /**
  * Display list language
  * @return Response
  */
 public function index()
 {
     $languages = Language::all();
     $filesobj = File::files(base_path() . '/resources/lang/en/');
     $files = array();
     $count_nhat = 0;
     $count_english = 0;
     foreach ($filesobj as $key => $value) {
         $namefile = basename($value);
         $tienganh = File::getRequire(base_path() . '/resources/lang/en/' . $namefile);
         $tiengnhat = File::getRequire(base_path() . '/resources/lang/jp/' . $namefile);
         foreach ($tienganh as $key => $value) {
             $count_english++;
             if (array_key_exists($key, $tiengnhat)) {
                 if ($tiengnhat[$key] != '') {
                     $count_nhat++;
                 }
             }
         }
     }
     $percent_language = round($count_nhat / $count_english * 100, 0);
     return view('language', compact('languages', 'percent_language'));
 }
开发者ID:phanngoc,项目名称:internal-tool,代码行数:27,代码来源:LanguagesController.php


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