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


PHP Setting::create方法代码示例

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


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

示例1: create

 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     $user = User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
     $setting = Setting::create(['title' => $data['setting']['title'], 'description' => $data['setting']['description']]);
     $setting->users()->sync([$user->id]);
     return $user;
 }
开发者ID:realnerdo,项目名称:blog,代码行数:13,代码来源:AuthController.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     \App\Setting::create(['name' => 'title', 'value' => 'Kibarer']);
     \App\Setting::create(['name' => 'description', 'value' => 'Property Agency']);
     \App\Setting::create(['name' => 'keyword', 'value' => 'kibarer, property agency, villa for sale, villa for rent, lands for sale, lands for rent']);
 }
开发者ID:borislemke,项目名称:kbr,代码行数:12,代码来源:SettingsTableSeeder.php

示例3: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \DB::table('settings')->delete();
     Setting::create(['key' => 'reading_count', 'value' => 7]);
     Setting::create(['key' => 'memory_count', 'value' => 7]);
     Setting::create(['key' => 'repeat_term', 'value' => 7]);
     Setting::create(['key' => 'lesson_size', 'value' => 30]);
 }
开发者ID:disik69,项目名称:backend.english-roulette-v0.3,代码行数:13,代码来源:SettingTableSeeder.php

示例4: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('settings', function (Blueprint $table) {
         $table->increments('id');
         $table->string('data');
     });
     Setting::create(['data' => ['website_title' => 'Synergie', 'admin_title' => 'Synergie', 'admin_email' => 'contact@website.com', 'website_description' => 'description', 'code_footer' => '', 'code_header' => '']]);
 }
开发者ID:victorboissiere,项目名称:Synergie,代码行数:13,代码来源:2015_12_21_201000_create_settings_table.php

示例5: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Setting::create(['name' => 'registration_group', 'setting' => env('REGISTRATION_GROUP')]);
     Setting::create(['name' => 'registration_group_id', 'setting' => env('REGISTRATION_GROUP_ID')]);
     Setting::create(['name' => 'default_home_directory', 'setting' => env('DEFAULT_HOME_DIRECTORY')]);
     Setting::create(['name' => 'default_shell', 'setting' => env('DEFAULT_SHELL')]);
     Setting::create(['name' => 'db_manager_url', 'setting' => env('DB_MANAGER_URL')]);
     Setting::create(['name' => 'current_uid_number', 'setting' => env('INITIAL_UID_NUMBER')]);
 }
开发者ID:UCCNetworkingSociety,项目名称:NetsocAdmin,代码行数:14,代码来源:SettingsSeeder.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // TODO: Implement run() method.
     DB::table("settings")->delete();
     $menu = array();
     array_push($menu, array(["name" => "Account Settings", "icon" => "mdi-accounts", "action" => ""]));
     array_push($menu, array(["name" => "System Settings", "icon" => "mdi-settings", "action" => ""]));
     array_push($menu, array(["name" => "Logout", "icon" => "mdi-accounts", "action" => ""]));
     Setting::create(["name" => "headermenu", "data" => json_encode($menu[0])]);
 }
开发者ID:poovarasanvasudevan,项目名称:laravel-skeleton,代码行数:15,代码来源:DatabaseSeeder.php

示例7: index

 /**
  * Show the application dashboard.
  *
  * @return Response
  */
 public function index()
 {
     try {
         $isInstalled = Setting::where('name', 'is_installed')->firstOrFail();
     } catch (ModelNotFoundException $e) {
         $isInstalled = Setting::create(['name' => 'is_installed', 'setting' => 'no']);
     }
     if ($isInstalled->setting != 'yes') {
         return Redirect::route('install');
     }
     $data = ["event" => Event::first(), "upcomingEvents" => Event::take(3)->get(), "news" => News::take(6)->get(), "media" => Media::where('processed', true)->orderBy('id', 'DESC')->take(12)->get()];
     return view('home')->with($data);
 }
开发者ID:TheJokersThief,项目名称:Eve,代码行数:18,代码来源:HomeController.php

示例8: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call('UserTableSeeder');
     Setting::create(['name' => 'password', 'setting' => Hash::make(env('ADMIN_PASSWORD'))]);
     Setting::create(['name' => 'name', 'setting' => env('NAME')]);
     Setting::create(['name' => 'email', 'setting' => env('ADMIN_EMAIL')]);
     Setting::create(['name' => 'email_period_lower_bound', 'setting' => 22]);
     Setting::create(['name' => 'email_period_upper_bound', 'setting' => 8]);
     Setting::create(['name' => 'last_email', 'setting' => 0]);
     Depression::create(['is_depressed' => 'no']);
     Model::reguard();
 }
开发者ID:botchagalupe,项目名称:AreYouDepressed-,代码行数:18,代码来源:DatabaseSeeder.php

示例9: run

 public function run()
 {
     Setting::truncate();
     Setting::create(['name' => 'name', 'value' => 'Hsinlu Si', 'description' => 'your name']);
     Setting::create(['name' => 'cover', 'value' => 'images/cover.jpg', 'description' => 'your profile cover']);
     Setting::create(['name' => 'avatar', 'value' => 'images/avatar.png', 'description' => 'your profile logo']);
     Setting::create(['name' => 'bio', 'value' => '欢迎来到我的个人网站,在这里我会给你分享我的文章、项目和生活感悟,希望你能喜欢!', 'description' => 'bio']);
     Setting::create(['name' => 'email', 'value' => 'hsinlu@live.com', 'description' => 'your email']);
     Setting::create(['name' => 'title', 'value' => 'Streamlet', 'description' => '网站标题']);
     Setting::create(['name' => 'subtitle', 'value' => '如澜若溪', 'description' => '网站副标题']);
     Setting::create(['name' => 'keywords', 'value' => 'hsinlu, php, laravel, coder, blog, knots, js, css', 'description' => 'website keywords']);
     Setting::create(['name' => 'description', 'value' => '欢迎来到我的个人网站,在这里我会给你分享我的文章、项目和生活感悟,希望你能喜欢!', 'description' => 'website description']);
     Setting::create(['name' => 'paginate_size', 'value' => '8', 'description' => 'How many articles should be displayed on each page.']);
     event(new \App\Events\DoneSetupEvent());
 }
开发者ID:angelWendy,项目名称:streamlet,代码行数:15,代码来源:SettingTableSeeder.php

示例10: run

 public function run()
 {
     Setting::create(['name' => 'site_name', 'value' => '林大帅的博客', 'description' => '站点名称', 'type' => 'text']);
     Setting::create(['name' => 'site_description', 'value' => 'Designing && Developing', 'description' => '站点描述', 'type' => 'text']);
     Setting::create(['name' => 'site_keywords', 'value' => '林大帅的博客, 设计, 开发', 'description' => '站点关键字', 'type' => 'text']);
     Setting::create(['name' => 'site_url', 'value' => 'http://www.90door.com/', 'description' => '站点网址', 'type' => 'text']);
     Setting::create(['name' => 'admin_id', 'value' => '1', 'description' => '后台管理员ID', 'type' => 'text']);
     Setting::create(['name' => 'bei_an', 'value' => '闽ICP备15000000号-1', 'description' => '站点备案号', 'type' => 'text']);
     Setting::create(['name' => 'tong_ji', 'value' => '<script src="http://s6.cnzz.com/stat.php?id=3236483&web_id=3236483" language="JavaScript"></script>', 'description' => '站点统计代码', 'type' => 'text']);
     Setting::create(['name' => 'cdn_domain', 'value' => 'http://source.90door.com', 'description' => '七牛cdn加速域名', 'type' => 'text']);
     Setting::create(['name' => 'cdn_on', 'value' => '0', 'description' => '七牛cdn加速开关,1 or 0', 'type' => 'text']);
     Setting::create(['name' => 'page_size', 'value' => '8', 'description' => '博文列表每页显示博文数量', 'type' => 'text']);
     Setting::create(['name' => 'expire', 'value' => '1', 'description' => '缓存过期时间,单位分钟', 'type' => 'text']);
     Setting::create(['name' => 'comment_on', 'value' => '1', 'description' => '文章评论开关,1 or 0', 'type' => 'text']);
     Setting::create(['name' => 'register_on', 'value' => '0', 'description' => '会员注册开关,1 or 0', 'type' => 'text']);
 }
开发者ID:kpaxer,项目名称:laravel-blog,代码行数:16,代码来源:SettingsTableSeeder.php

示例11: run

 public function run()
 {
     DB::table('settings')->delete();
     // Total number of societies
     Setting::create(['name' => 'number_of_societies', 'setting' => '103']);
     // The next society to process
     Setting::create(['name' => 'next_society', 'setting' => '0']);
     // The next user to process
     Setting::create(['name' => 'next_user', 'setting' => '1']);
     // The URL of your logo
     Setting::create(['name' => 'logo', 'setting' => 'http://netsoc.co/wp-content/themes/netsoc/images/horizontal.png']);
     // The alternate logo for the front page (in white)
     Setting::create(['name' => 'logo_alt', 'setting' => env('BASE_URL') . '/images/logo_alt.png']);
     // The full name of your society
     Setting::create(['name' => 'name', 'setting' => 'UCC Networking, Gaming And Technology Society']);
     $this->command->info('Settings table seeded!');
 }
开发者ID:boregan,项目名称:lowdown,代码行数:17,代码来源:DatabaseSeeder.php

示例12: postSettings

 public function postSettings(Request $request)
 {
     $user_id = Auth::user()->id;
     $input = $request->all();
     $validator = Validator::make($input, ['custom_domain' => 'required']);
     if ($validator->passes()) {
         $data['customer_id'] = $user_id;
         $data['name'] = 'custom_domain';
         $data['value'] = removeSchemaUrl($input['custom_domain']);
         $setting = Setting::whereName('custom_domain')->where('customer_id', '=', $user_id)->first();
         if (!$setting) {
             Setting::create($data);
         } else {
             $setting->value = $data['value'];
             $setting->save();
         }
         return redirect()->back()->with("status", "Settings updated successfully");
     } else {
         return redirect()->back()->withErrors($validator)->withInput();
     }
 }
开发者ID:abrarjahin,项目名称:Laravel_5.1_test_project_to_look_at,代码行数:21,代码来源:AdminAreaController.php

示例13: run

 public function run()
 {
     DB::table('setting')->delete();
     $settings = array(array('name' => 'routeTaskUrl', 'value' => 'http://rsmm2014.com:6080/arcgis/rest/services/SIMTARU/ROUTE/NAServer/Route'), array('name' => 'printTaskURL', 'value' => 'http://rsmm2014.com:6080/arcgis/rest/services/SIMTARU/ExportWebMap/GPServer/Export%20Web%20Map'));
     foreach ($settings as $setting) {
         Setting::create($setting);
     }
 }
开发者ID:muhamadanjar,项目名称:rth,代码行数:8,代码来源:DatabaseSeeder.php

示例14: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Setting::create(['company_name' => 'GREEN ARCHITECTURE DESIGN', 'company_logo' => '', 'copyright' => 'COPYRIGHT 2015', 'meta_title' => 'GREEN ARCHITECTURE DESIGN', 'meta_content' => 'GREEN ARCHITECTURE DESIGN', 'meta_description' => 'GREEN ARCHITECTURE DESIGN', 'meta_keyword' => 'GREEN ARCHITECTURE DESIGN', 'created_by' => 1, 'updated_by' => 1, 'status' => 1]);
 }
开发者ID:TEACHER-KEAK,项目名称:GAD,代码行数:9,代码来源:SettingTableSeeder.php

示例15: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Setting::create(['key' => 'rub_course', 'value' => 1]);
     Setting::create(['key' => 'usd_course', 'value' => 78]);
     Setting::create(['key' => 'eur_course', 'value' => 87]);
 }
开发者ID:Eduard90,项目名称:Laravel-5-Example,代码行数:11,代码来源:SettingsSeeder.php


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