本文整理汇总了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' => ""]);
}
示例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']);
}
示例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']);
}
示例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');
}
示例5: run
public function run()
{
DB::statement('TRUNCATE TABLE t_px_setting CASCADE');
Setting::create(['is_open' => 1]);
}