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


PHP Setting::create方法代码示例

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


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

示例1: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('settings')->delete();
     Setting::create(['key' => 'about', 'name' => 'A propos du BDE', 'value' => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam"]);
     Setting::create(['key' => 'be-main-photo', 'name' => "Photo de l'event à la une", 'value' => "http://bde.42.fr/main.jpg"]);
     Setting::create(['key' => 'be-bg-photo', 'name' => "Arrière plan de l'event à la une", 'value' => "http://bde.42.fr/branding.jpg"]);
     Setting::create(['key' => 'be-label', 'name' => "Label de l'event à la une", 'value' => "Eté 2015"]);
     Setting::create(['key' => 'be-title', 'name' => "Titre de l'event à la une", 'value' => "#JePeuxPasJaiPiscine"]);
     Setting::create(['key' => 'be-description', 'name' => "Résumé de l'event à la une", 'value' => "Pour vous aider, nous vous avons préparé une carte des environs, bon courage !"]);
     Setting::create(['key' => 'be-link', 'name' => "Lien de l'event à la une", 'value' => "url"]);
     Setting::create(['key' => 'agenda', 'name' => "Agenda de la semaine", 'value' => ""]);
 }
开发者ID:bde42,项目名称:website_v2_laravel,代码行数:17,代码来源:SettingsTableSeeder.php

示例2: run

 public function run()
 {
     Setting::create(['key' => 'church_name', 'value' => '', 'category' => 'General']);
     Setting::create(['key' => 'church_abbreviated_name', 'value' => '', 'category' => 'General']);
     Setting::create(['key' => 'church_latitude', 'value' => '', 'category' => 'Maps']);
     Setting::create(['key' => 'church_longitude', 'value' => '', 'category' => 'Maps']);
     Setting::create(['key' => 'bulksms_user', 'value' => '', 'category' => 'SMS']);
     Setting::create(['key' => 'bulksms_password', 'value' => '', 'category' => 'SMS']);
     Setting::create(['key' => 'smsfactory_user', 'value' => '', 'category' => 'SMS']);
     Setting::create(['key' => 'smsfactory_password', 'value' => '', 'category' => 'SMS']);
     Setting::create(['key' => 'system_calendar', 'value' => '', 'category' => 'Calendars']);
     Setting::create(['key' => 'church_website', 'value' => '', 'category' => 'General']);
     Setting::create(['key' => 'church_postal_address', 'value' => '', 'category' => 'General']);
     Setting::create(['key' => 'church_email', 'value' => '', 'category' => 'General']);
     Setting::create(['key' => 'colour_scheme', 'value' => 'cerulean', 'category' => 'General']);
     Setting::create(['key' => 'birthday_email', 'value' => '', 'category' => 'Emails']);
     Setting::create(['key' => 'group_report', 'value' => '', 'category' => 'Emails']);
 }
开发者ID:bishopm,项目名称:circuit,代码行数:18,代码来源:DatabaseSeeder.php

示例3: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \App\Models\Setting::create(['name' => 'department', 'value' => 'IT Department (aka Department Of Magic)' . PHP_EOL . 'Ministry Of Sales']);
     \App\Models\Setting::create(['name' => 'prefer', 'value' => 'barcode']);
     \App\Models\Setting::create(['name' => 'reminder_days', 'value' => '1']);
 }
开发者ID:exfriend,项目名称:larabox,代码行数:11,代码来源:SettingsTableSeeder.php

示例4: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(SettingsRequest $request)
 {
     $setting = Setting::create($request->all());
     return Redirect::route('settings.index')->with('okmessage', 'New setting has been added');
 }
开发者ID:bishopm,项目名称:circuit,代码行数:10,代码来源:SettingsController.php

示例5: run

 public function run()
 {
     DB::statement('TRUNCATE TABLE t_px_setting CASCADE');
     Setting::create(['is_open' => 1]);
 }
开发者ID:rxfu,项目名称:jspx,代码行数:5,代码来源:SettingTableSeeder.php


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