You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.0 KiB
PHP
53 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class PushConfigData extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
$data = [[
|
|
'label' => 'Logo',
|
|
'value' => '/storage/assets/logo.png',
|
|
'type' => '2',
|
|
], [
|
|
'label' => 'Favicon',
|
|
'value' => '/storage/assets/favicon.png',
|
|
'type' => '2',
|
|
], [
|
|
'label' => 'Login欢迎图片',
|
|
'value' => '/storage/assets/login_image.jpg',
|
|
'type' => '2',
|
|
], [
|
|
'label' => '网站名称',
|
|
'value' => env('APP_NAME'),
|
|
'type' => '1',
|
|
]];
|
|
foreach ($data as $datum) {
|
|
$config = new App\Models\Config();
|
|
$config->label = $datum['label'];
|
|
$config->value = $datum['value'];
|
|
$config->type = $datum['type'];
|
|
$config->remark = '';
|
|
$config->save();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
//
|
|
}
|
|
}
|