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


PHP Language::create方法代码示例

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


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

示例1: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  StoreLanguageRequest  $request
  * @return Response
  */
 public function store(StoreLanguageRequest $request)
 {
     // create the language
     Language::create($request->all());
     // flash message
     session()->flash('flash_message', 'Language added successfully.');
     return redirect()->route('languages.create');
 }
开发者ID:noorxbyte,项目名称:vultex,代码行数:14,代码来源:LanguagesController.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     \App\Language::create(['name' => 'english', 'code' => 'en', 'icon' => 'en.png']);
     \App\Language::create(['name' => 'bahasa', 'code' => 'id', 'icon' => 'id.png']);
     \App\Language::create(['name' => 'french', 'code' => 'fr', 'icon' => 'fr.png']);
     \App\Language::create(['name' => 'rusian', 'code' => 'ru', 'icon' => 'ru.png']);
 }
开发者ID:candrasetiadi,项目名称:nvjvnjsdnnvdvdw,代码行数:13,代码来源:LanguagesTableSeeder.php

示例3: insert

 public function insert($data)
 {
     // Validating data
     $validator = Validator::make($data, Language::createrules());
     // If there are no errors in data
     if (!$validator->fails()) {
         // Create Language
         $language = Language::create($data);
         // Passing data to response service
         return $this->responseService->returnMessage($language, 'Language was not Inserted.');
     } else {
         // Data has errors
         // Passing errors to response service
         return $this->responseService->errorMessage($validator->errors()->all());
     }
 }
开发者ID:owemus,项目名称:personal_be,代码行数:16,代码来源:LanguageService.php

示例4: store

 /**
  * Store a newly created language in storage
  *
  * @param LanguageRequest $request
  * @return Response
  */
 public function store(LanguageRequest $request)
 {
     $language = Language::create(ImageService::uploadImage($request, 'flag'));
     $language->id ? Flash::success(trans('admin.create.success')) : Flash::error(trans('admin.create.fail'));
     return redirect(route('admin.language.index'));
 }
开发者ID:kravn,项目名称:TTG-CMS,代码行数:12,代码来源:LanguageController.php

示例5: run

 public function run()
 {
     Language::truncate();
     Language::create(['name' => 'English', 'iso_code' => 'en', 'language_code' => 'en-en', 'date_format_lite' => 'm/j/Y', 'date_format_full' => 'm/j/Y H:i:s', 'date_format_lite_view' => 'm/j/Y', 'date_format_full_view' => 'm/j/Y H:i:s', 'active' => '1', 'created_at' => \Carbon\Carbon::createFromDate(2015, 04, 01)->toDateTimeString(), 'updated_at' => \Carbon\Carbon::now()->toDateTimeString()]);
     Language::create(['name' => 'Español', 'iso_code' => 'es', 'language_code' => 'es-es', 'date_format_lite' => 'd/m/Y', 'date_format_full' => 'd/m/Y H:i:s', 'date_format_lite_view' => 'd/m/Y', 'date_format_full_view' => 'd/m/Y H:i:s', 'active' => '1', 'created_at' => \Carbon\Carbon::createFromDate(2015, 04, 01)->toDateTimeString(), 'updated_at' => \Carbon\Carbon::now()->toDateTimeString()]);
 }
开发者ID:rogerapras,项目名称:aBillander,代码行数:6,代码来源:LanguagesTableSeeder.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Language::create(['code' => 'vi', 'name' => 'Tiếng Việt', 'priority' => 0, 'is_default' => 1, 'is_key_language' => 1]);
 }
开发者ID:phantsang,项目名称:1u0U39rjwJO4Vmnt99uk9j6,代码行数:9,代码来源:LanguagesTableSeeder.php

示例7: run

 public function run()
 {
     DB::table('languages')->delete();
     Language::create(['title' => 'Türkçe', 'code' => 'tr', 'site_title' => 'Blog', 'site_description' => 'Muhteşem Blogum']);
     Language::create(['title' => 'English', 'code' => 'en', 'site_title' => 'Blog', 'site_description' => 'My Awesome Blog']);
 }
开发者ID:boynoiz,项目名称:laravel-5-simple-cms,代码行数:6,代码来源:LanguagesTableSeeder.php

示例8: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // General
     \App\Language::create(['code' => 'es', 'name' => 'Español', 'image' => 'es.png']);
     \App\Site::create(['name' => 'Plataforma ', 'domain' => 'http://mimg.dev/', 'root' => '/', 'es' => ['title' => 'PROGRAMA MUNICIPAL DE RECONOCIMIENTO Y FOMENTO A INICIATIVAS SOSTENIBLES', 'description' => 'Nuestro objetivo es programar la plataforma del Programa Municipal de Reconocimiento y Fomento a Iniciativas Sostenibles en formato es php y sql para entorno web, en base a un contenido y diseño previamente definido.', 'keywords' => 'programa, municipal, iniciativas sostenibles, medio ambiente, guayaquil, ecuador'], 'google_verification' => '', 'analytics' => '']);
     // Nodos
     $node_registry_a = \App\Node::create(['name' => 'registry-a', 'table_name' => 'registry_a', 'type' => 'form']);
     \App\NodeExtra::create(['parent_id' => $node_registry_a->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'field', 'value_array' => json_encode(['status', 'company_type', 'guayaquil_zone'])]);
     \App\NodeExtra::create(['parent_id' => $node_registry_a->id, 'display' => 'admin', 'type' => 'graph', 'parameter' => 'pie', 'value_array' => json_encode(['status', 'company_type', 'guayaquil_zone'])]);
     $node_registry_b = \App\Node::create(['name' => 'registry-b', 'table_name' => 'registry_b', 'type' => 'form']);
     \App\NodeExtra::create(['parent_id' => $node_registry_b->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'field', 'value_array' => json_encode(['status', 'clasification', 'guayaquil_belongs'])]);
     \App\NodeExtra::create(['parent_id' => $node_registry_b->id, 'display' => 'admin', 'type' => 'graph', 'parameter' => 'pie', 'value_array' => json_encode(['status', 'clasification', 'guayaquil_belongs'])]);
     $node_postulation_a = \App\Node::create(['name' => 'postulation-a', 'table_name' => 'postulation_a', 'type' => 'form']);
     \App\NodeExtra::create(['parent_id' => $node_postulation_a->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'field', 'value_array' => json_encode(['status'])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_a->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'parent_field', 'value_array' => json_encode([['name' => 'guayaquil_zone', 'parent' => 'registry-a', 'data' => 'registry_a_id'], ['name' => 'company_type', 'parent' => 'registry-a', 'data' => 'registry_a_id']])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_a->id, 'display' => 'admin', 'type' => 'graph', 'parameter' => 'pie', 'value_array' => json_encode(['status'])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_a->id, 'display' => 'admin', 'type' => 'parent_graph', 'parameter' => 'pie', 'value_array' => json_encode([['name' => 'guayaquil_zone', 'parent' => 'registry_a', 'data' => 'registry_a_id'], ['name' => 'company_type', 'parent' => 'registry_a', 'data' => 'registry_a_id']])]);
     $node_postulation_b = \App\Node::create(['name' => 'postulation-b', 'table_name' => 'postulation_b', 'type' => 'form']);
     \App\NodeExtra::create(['parent_id' => $node_postulation_b->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'field', 'value_array' => json_encode(['status'])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_b->id, 'display' => 'admin', 'type' => 'filter', 'parameter' => 'parent_field', 'value_array' => json_encode([['name' => 'guayaquil_belongs', 'parent' => 'registry-b', 'data' => 'registry_b_id'], ['name' => 'clasification', 'parent' => 'registry-b', 'data' => 'registry_b_id']])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_b->id, 'display' => 'admin', 'type' => 'graph', 'parameter' => 'pie', 'value_array' => json_encode(['status'])]);
     \App\NodeExtra::create(['parent_id' => $node_postulation_b->id, 'display' => 'admin', 'type' => 'parent_graph', 'parameter' => 'pie', 'value_array' => json_encode([['name' => 'guayaquil_belongs', 'parent' => 'registry_b', 'data' => 'registry_b_id'], ['name' => 'clasification', 'parent' => 'registry_b', 'data' => 'registry_b_id']])]);
     $node_deadlines = \App\Node::create(['name' => 'deadline']);
     $node_social_network = \App\Node::create(['name' => 'social-network', 'table_name' => 'social_networks', 'location' => 'app', 'type' => 'global', 'model' => '\\App\\SocialNetwork']);
     $node_title = \App\Node::create(['name' => 'title']);
     $node_content = \App\Node::create(['name' => 'content']);
     $node_banner = \App\Node::create(['name' => 'banner']);
     $node_agenda = \App\Node::create(['name' => 'agenda']);
     $node_sponsor = \App\Node::create(['name' => 'sponsor']);
     $node_contact = \App\Node::create(['name' => 'contact', 'table_name' => 'contact']);
     $node_form_contact = \App\Node::create(['name' => 'form-contact', 'type' => 'form', 'table_name' => 'form_contact']);
     // Menu: Home
     $page_home = \App\Page::create(['type' => 'customized', 'customized_name' => 'home', 'es' => ['name' => 'Inicio']]);
     \App\Menu::create(['page_id' => $page_home->id]);
     \App\Section::create(['id' => 1, 'page_id' => $page_home->id, 'node_id' => $node_title->id]);
     \App\Section::create(['id' => 2, 'page_id' => $page_home->id, 'node_id' => $node_content->id]);
     \App\Section::create(['id' => 3, 'page_id' => $page_home->id, 'node_id' => $node_title->id]);
     \App\Section::create(['id' => 4, 'page_id' => $page_home->id, 'node_id' => $node_agenda->id]);
     \App\Section::create(['id' => 5, 'page_id' => $page_home->id, 'node_id' => $node_title->id]);
     \App\Section::create(['id' => 6, 'page_id' => $page_home->id, 'node_id' => $node_sponsor->id]);
     // Menu: Sobre el Programa
     $page_programa = \App\Page::create(['es' => ['name' => 'Sobre el Programa']]);
     \App\Menu::create(['page_id' => $page_programa->id]);
     \App\Section::create(['id' => 7, 'page_id' => $page_programa->id, 'node_id' => $node_content->id]);
     // Menu: Categorias
     $page_categorias = \App\Page::create(['es' => ['name' => 'Categorias']]);
     \App\Menu::create(['page_id' => $page_categorias->id]);
     \App\Section::create(['id' => 8, 'page_id' => $page_categorias->id, 'node_id' => $node_content->id]);
     // Menu: Premios
     $page_premios = \App\Page::create(['es' => ['name' => 'Premios']]);
     \App\Menu::create(['page_id' => $page_premios->id]);
     \App\Section::create(['id' => 9, 'page_id' => $page_premios->id, 'node_id' => $node_content->id]);
     // Menu: Cronograma
     $page_cronograma = \App\Page::create(['es' => ['name' => 'Cronograma']]);
     \App\Menu::create(['page_id' => $page_cronograma->id]);
     \App\Section::create(['id' => 10, 'page_id' => $page_cronograma->id, 'node_id' => $node_content->id]);
     // Menu: Registro
     $menu_registro = \App\Menu::create(['type' => 'blank', 'es' => ['name' => 'Registro']]);
     $page_registro_a = \App\Page::create(['es' => ['name' => 'Registro A']]);
     \App\Menu::create(['level' => 2, 'parent_id' => $menu_registro->id, 'es' => ['name' => 'A. Distinción a empresas ambientalmente sostenibles', 'link' => 'registro-a']]);
     \App\Section::create(['id' => 11, 'page_id' => $page_registro_a->id, 'node_id' => $node_content->id]);
     \App\Section::create(['id' => 12, 'page_id' => $page_registro_a->id, 'node_id' => $node_registry_a->id]);
     $page_registro_b = \App\Page::create(['es' => ['name' => 'Registro B']]);
     \App\Menu::create(['level' => 2, 'parent_id' => $menu_registro->id, 'es' => ['name' => 'B. Capital semilla a iniciativas sostenibles', 'link' => 'registro-b']]);
     \App\Section::create(['id' => 13, 'page_id' => $page_registro_b->id, 'node_id' => $node_content->id]);
     \App\Section::create(['id' => 14, 'page_id' => $page_registro_b->id, 'node_id' => $node_registry_b->id]);
     // Page: Postulación A
     $page_postulacion_a = \App\Page::create(['es' => ['name' => 'Postulacion A']]);
     \App\Section::create(['id' => 15, 'page_id' => $page_postulacion_a->id, 'node_id' => $node_content->id]);
     \App\Section::create(['id' => 16, 'page_id' => $page_postulacion_a->id, 'node_id' => $node_postulation_a->id]);
     // Page: Postulación B
     $page_postulacion_b = \App\Page::create(['es' => ['name' => 'Postulacion B']]);
     \App\Section::create(['id' => 17, 'page_id' => $page_postulacion_b->id, 'node_id' => $node_content->id]);
     \App\Section::create(['id' => 18, 'page_id' => $page_postulacion_b->id, 'node_id' => $node_postulation_b->id]);
     // Menu: Contacto
     $page_contacto = \App\Page::create(['es' => ['name' => 'Contacto']]);
     \App\Menu::create(['page_id' => $page_contacto->id]);
     \App\Section::create(['id' => 19, 'page_id' => $page_contacto->id, 'node_id' => $node_contact->id]);
     \App\Section::create(['id' => 20, 'page_id' => $page_contacto->id, 'node_id' => $node_form_contact->id]);
     // Panel: Postulaciones
     $page_postulaciones = \App\Page::create(['type' => 'customized', 'customized_name' => 'postulaciones', 'es' => ['name' => 'Postulaciones']]);
     \App\Section::create(['id' => 21, 'page_id' => $page_postulaciones->id, 'node_id' => $node_content->id]);
     // Home Segunda Parte
     \App\Section::create(['id' => 22, 'page_id' => $page_home->id, 'node_id' => $node_banner->id]);
     // Crear menu en Admin
     /*$m_list = \App\Menu::create(['menu_type'=>'admin', 'icon'=>'th-list', 'es'=>['name'=>'Listas de Correos', 'link'=>'admin/model-list/target-list']]);
       $m_email = \App\Menu::create(['menu_type'=>'admin', 'icon'=>'th-list', 'es'=>['name'=>'Enviar Emails', 'link'=>'admin/model-list/email']]);
       $m_history = \App\Menu::create(['menu_type'=>'admin', 'icon'=>'th-list', 'es'=>['name'=>'Emails Enviados', 'link'=>'admin/model-list/sent-email']]);*/
     // Variables
     \App\Variable::create(['name' => 'admin_email', 'type' => 'string', 'es' => ['value' => 'edumejia30@gmail.com']]);
     \Solunes\Master\App\Variable::create(['name' => 'footer_name', 'type' => 'string', 'es' => ['value' => 'GAD MUNICIPAL DE GUAYAQUIL - GUAYAQUIL, ECUADOR']]);
     \Solunes\Master\App\Variable::create(['name' => 'footer_rights', 'type' => 'string', 'es' => ['value' => 'TODOS LOS DERECHOS RESERVADOS']]);
     // Social Networks
     \App\SocialNetwork::create(['code' => 'facebook', 'url' => 'https://www.facebook.com/alcaldiaguayaquil/']);
     \App\SocialNetwork::create(['code' => 'twitter', 'url' => 'https://twitter.com/alcaldiagye/']);
//.........这里部分代码省略.........
开发者ID:solunes,项目名称:master,代码行数:101,代码来源:MasterSeeder.php

示例9: run

 public function run()
 {
     DB::table('languages')->delete();
     Language::create(['title' => 'Spanish', 'code' => 'sp', 'site_title' => 'CMPD Winter Gift Project', 'site_description' => '']);
     Language::create(['title' => 'English', 'code' => 'en', 'site_title' => 'CMPD Winter Gift Project', 'site_description' => '']);
 }
开发者ID:CodeForCharlotte,项目名称:cmpd-holiday-gift-backend,代码行数:6,代码来源:LanguageTableSeeder.php

示例10: store

 /**
  * Store a newly created language in storage
  *
  * @param LanguageRequest $request
  * @return Response
  */
 public function store(LanguageRequest $request)
 {
     $data = $this->storeImage($request, 'flag');
     Language::create($data) == true ? Flash::success(trans('admin.create.success')) : Flash::error(trans('admin.create.fail'));
     return redirect(route('admin.language.index'));
 }
开发者ID:abada,项目名称:laravel-5-simple-cms,代码行数:12,代码来源:LanguageController.php

示例11: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Language::create(['id' => 'kh', 'full_word' => 'Khmer', 'logo' => 'khmer.png', 'status' => 1, 'created_by' => 1, 'updated_by' => 1]);
     Language::create(['id' => 'en', 'full_word' => 'English', 'logo' => 'english.png', 'status' => 1, 'created_by' => 1, 'updated_by' => 1, 'is_default' => 1]);
     Language::create(['id' => 'ch', 'full_word' => 'Chinese', 'logo' => 'chinese.png', 'status' => 1, 'created_by' => 1, 'updated_by' => 1]);
 }
开发者ID:TEACHER-KEAK,项目名称:GAD,代码行数:11,代码来源:LanguageTableSeeder.php

示例12: run

 /**
  * Run the database seeds.
  */
 public function run()
 {
     Language::create(['id' => 1, 'name' => 'Spanish', 'prefix' => 'ES']);
 }
开发者ID:juboba,项目名称:Luminosity,代码行数:7,代码来源:LanguageTableSeeder.php

示例13: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request)
 {
     $input = Input::All();
     Language::create($input);
     return Redirect::route('admin.setup.qualification.languages.index')->withFlashSuccess('Language data was successfully created.');
 }
开发者ID:krizzna,项目名称:hrportal,代码行数:12,代码来源:LanguageController.php

示例14: run

 public function run()
 {
     DB::table('languages')->delete();
     Language::create(['name' => 'English']);
     Language::create(['name' => 'Vietnamese']);
     Language::create(['name' => 'French']);
 }
开发者ID:AlSt2015,项目名称:jobs4creative,代码行数:7,代码来源:DatabaseSeeder.php


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