Commit a5b585f7 by Aan Choesni Herlingga

add seeder and add field in table setting

parent 35421bc2
...@@ -15,6 +15,7 @@ class CreateSettingsTable extends Migration ...@@ -15,6 +15,7 @@ class CreateSettingsTable extends Migration
{ {
Schema::create('swp_settings', function (Blueprint $table) { Schema::create('swp_settings', function (Blueprint $table) {
$table->string('id', 36)->primary(); $table->string('id', 36)->primary();
$table->string('show_name_setting');
$table->string('name_setting'); $table->string('name_setting');
$table->string('value_setting'); $table->string('value_setting');
$table->string('userid_created', 36)->nullable(); $table->string('userid_created', 36)->nullable();
......
<?php
use Illuminate\Database\Seeder;
class SettingsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// Post per page
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'POST PER PAGE',
'name_setting' => 'post_per_page',
'value_setting' => '6',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// Email
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'EMAIL',
'name_setting' => 'email',
'value_setting' => 'ppti@unesa.ac.id',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// HEADER
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'HEADER',
'name_setting' => 'header_admin',
'value_setting' => 'Master',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// DIRECTORY STORAGE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'DIRECTORY STORAGE',
'name_setting' => 'directory',
'value_setting' => 'profileunesa_konten_statik/uploads/new-webprofile',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// WEB TITILE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'WEB TITILE',
'name_setting' => 'web_title',
'value_setting' => 'NEW WPSS | PPTI Universitas Negeri Surabaya',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// LOGO
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'LOGO',
'name_setting' => 'logo',
'value_setting' => 'https://www.unesa.ac.id/assets/switcher/images/logo.png',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// STYLE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'STYLE',
'name_setting' => 'style',
'value_setting' => 'style-wpss.css',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// ONE PAGE?
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'ONE PAGE?',
'name_setting' => 'onepage',
'value_setting' => '1',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// EKSTERNAL STORAGE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'EKSTERNAL STORAGE',
'name_setting' => 'external_storage',
'value_setting' => '1',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// URL STORAGE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'URL STORAGE',
'name_setting' => 'url_static',
'value_setting' => 'https://statik.unesa.ac.id',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// AUTO TRANSLATE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'AUTO TRANSLATE',
'name_setting' => 'auto_translate',
'value_setting' => '1',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// THEME
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'THEME',
'name_setting' => 'theme',
'value_setting' => 'jollyany',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
// LANGUAGE
DB::table('swp_settings')->insert([
'id' => Str::uuid()->toString(),
'show_name_setting' => 'LANGUAGE',
'name_setting' => 'default_language',
'value_setting' => 'id',
'userid_created' => 'Aan Choesni Herlingga',
'userid_updated' => 'Aan Choesni Herlingga',
]);
}
}
<?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
class UsersTableSeeder extends Seeder
{
use UuidTrait;
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'id' => Str::uuid()->toString(),
'name' => 'Aan Choesni Herlingga',
'email' => 'aanchoesni@unesa.ac.id',
'email_verified_at' => null,
'password' => Hash::make('anchuz2020'),
'remember_token' => null,
]);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment