/** * 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; }
/** * 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']); }
/** * 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]); }
/** * 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' => '*****@*****.**', 'website_description' => 'description', 'code_footer' => '', 'code_header' => '']]); }
/** * 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')]); }
/** * 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])]); }
/** * 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); }
/** * 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(); }
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' => '*****@*****.**', '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()); }
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']); }
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!'); }
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(); } }
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); } }
/** * 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]); }
/** * 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]); }
public function setPassword() { $hashedPassword = Hash::make(env('ADMIN_PASSWORD')); try { $passwordSetting = Setting::where('name', 'password')->firstOrFail(); $passwordSetting->setting = $hashedPassword; $passwordSetting->save(); } catch (ModelNotFoundException $e) { Setting::create(['name' => 'password', 'setting' => $hashedPassword]); } return Redirect::route('admin'); }
public function store(Requests\SettingRequest $request) { return ['ok' => !!Setting::create($request->all())]; }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $setting = Setting::create($request->all()); return redirect('admin/articles'); }
public function run() { DB::table('settings')->delete(); Setting::create(['email' => '*****@*****.**', 'facebook' => 'http://facebook.com/myProfile', 'twitter' => 'http://twitter.com/myProfile']); }
public function create($data) { $setting = Setting::create($data); return $setting; }