6
0
Fork 0
jiqu-library-server/database/seeders/AppSettingSeeder.php

69 lines
2.5 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Setting;
use Illuminate\Database\Seeder;
class AppSettingSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
foreach ([
'app'=> [
'value'=> [
'app_name' => '子春生',
'order_payment_expires_at' => 1800,
'order_auto_complete_days' => 7,
'sale_after_expire_days' => 7,
'sign_click_points' => 5,
'sign_click_continue' => 7,
'sign_click_continue_points' => 10,
'article_help' => 1,
'article_agreement' => 2,
'article_health' => 3,
'article_about_us' => env('APP_URL', '').'/h5/articles/1',
'article_user_promotion_agreement' => env('APP_URL', '').'/h5/articles/2',
'article_user_hide_agreement' => env('APP_URL', '').'/h5/articles/3',
'invite_uri' => '',
'search_hot_keys' => '搜索热词,分词1,分词2,分词3',
],
'remarks' => '系统配置',
],
'kuaidi100' => [
'value' => [
'is_use' => true,
'callback_uri' => env('APP_URL', '').'/callback/kuaidi100',
'app_key' => 'BTvgbjti4727',
'customer' => '064109188EC4D85DA655DFC342144C6A',
'secret' => '1bd287d1981749f2a30ea74cac0ab99c',
'userid' => 'ec0b6ec7729d4f22824cfd3c519dd45b',
],
'remarks' => '快递100配置',
],
'unipush' => [
'value' =>[
'is_use' => true,
'mall_app_id' => 'iikmCoESID8bC1LhOPG1r8',
'mall_app_key' => 'JX33P0wP8bAQprI953hpN6',
'mall_app_secret' => 'a3u3B6lXjq6fPTBlOGiOc9',
'mall_master_secret' => 'MAxmqomwo597xJeDuMCvx1',
'merchant_is_use' => false,
'merchant_app_id' => '',
'merchant_app_key' => '',
'merchant_app_secret' => '',
'merchant_master_secret' => '',
],
'remarks' => '个推配置',
],
] as $key => $values) {
Setting::firstOrCreate(['key' => $key], $values);
}
}
}