Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webprofile-jwg2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
webprofile-jwg2024
Commits
a5b585f7
Commit
a5b585f7
authored
Jan 29, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add seeder and add field in table setting
parent
35421bc2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
172 additions
and
0 deletions
+172
-0
database/migrations/2019_11_12_114258_create_settings_table.php
+1
-0
database/seeds/SettingsTableSeeder.php
+144
-0
database/seeds/UsersTableSeeder.php
+27
-0
No files found.
database/migrations/2019_11_12_114258_create_settings_table.php
View file @
a5b585f7
...
...
@@ -15,6 +15,7 @@ class CreateSettingsTable extends Migration
{
Schema
::
create
(
'swp_settings'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'id'
,
36
)
->
primary
();
$table
->
string
(
'show_name_setting'
);
$table
->
string
(
'name_setting'
);
$table
->
string
(
'value_setting'
);
$table
->
string
(
'userid_created'
,
36
)
->
nullable
();
...
...
database/seeds/SettingsTableSeeder.php
0 → 100644
View file @
a5b585f7
<?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'
,
]);
}
}
database/seeds/UsersTableSeeder.php
0 → 100644
View file @
a5b585f7
<?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
,
]);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment