Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Learning and Work
managing-money-api
Commits
eb53246a
Commit
eb53246a
authored
Jul 09, 2018
by
Jack Stupple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to languages
parent
c1820924
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
database/migrations/2018_04_18_00000_initial.php
database/migrations/2018_04_18_00000_initial.php
+3
-3
database/migrations/2018_04_18_00002_add_new_supported_languages.php
...grations/2018_04_18_00002_add_new_supported_languages.php
+9
-14
No files found.
database/migrations/2018_04_18_00000_initial.php
View file @
eb53246a
...
...
@@ -187,16 +187,16 @@ class Initial extends Migration
]);
DB
::
table
(
'languages'
)
->
insert
([
'name'
=>
'
Nederlands
'
,
'name'
=>
'
Dutch
'
,
'slug'
=>
'nl'
,
'enabled'
=>
$this
->
created_at
,
'created_at'
=>
$this
->
created_at
]);
DB
::
table
(
'languages'
)
->
insert
([
'name'
=>
'
Deutch
'
,
'name'
=>
'
German
'
,
'slug'
=>
'de'
,
'enabled'
=>
null
,
'enabled'
=>
$this
->
created_at
,
'created_at'
=>
$this
->
created_at
]);
...
...
database/migrations/2018_04_18_00002_add_new_supported_languages.php
View file @
eb53246a
...
...
@@ -14,27 +14,22 @@ class AddNewSupportedLanguages extends Migration
public
function
up
()
{
$now
=
date
(
'Y-m-d H:i:s'
);
// remove the old one that was spelled wrong
$de
=
\
App\Language
::
where
(
'name'
,
'Deutsch'
)
->
first
();
if
(
$de
)
{
$de
->
delete
();
}
$de
=
\
App\Language
::
firstOrCreate
([
'name'
=>
'Deutsch'
,
'slug'
=>
'de'
]);
$de
->
enabled
=
$now
;
$de
->
save
();
$no
=
\
App\Language
::
firstOrCreate
([
'name'
=>
'Nor
sk
'
,
'name'
=>
'Nor
wegian
'
,
'slug'
=>
'no'
]);
$no
->
enabled
=
$now
;
$no
->
save
();
$sl
=
\
App\Language
::
firstOrCreate
([
'name'
=>
'Slovenian'
,
'slug'
=>
'sl'
]);
$sl
->
enabled
=
$now
;
$sl
->
save
();
}
/**
...
...
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