Initial Commit
This commit is contained in:
commit
9b22323711
36 changed files with 7164 additions and 0 deletions
BIN
database/database.sqlite
Normal file
BIN
database/database.sqlite
Normal file
Binary file not shown.
0
database/migrations/.gitkeep
Normal file
0
database/migrations/.gitkeep
Normal file
33
database/migrations/2020_09_12_172753_initial.php
Normal file
33
database/migrations/2020_09_12_172753_initial.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class Initial extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('words', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid('uuid')->unique()->index();
|
||||
$table->string('value')->unique();
|
||||
$table->enum('type', ['sex', 'yoga']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
17
database/seeds/DatabaseSeeder.php
Normal file
17
database/seeds/DatabaseSeeder.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(WordsTableSexSeeder::class);
|
||||
$this->call(WordsTableYogaSeeder::class);
|
||||
}
|
||||
}
|
||||
46
database/seeds/WordsTableSexSeeder.php
Normal file
46
database/seeds/WordsTableSexSeeder.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Word;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class WordsTableSexSeeder extends Seeder
|
||||
{
|
||||
protected $_list = [
|
||||
"Heta stolen",
|
||||
"Den omvända saxen",
|
||||
"Spindeln",
|
||||
"Skeden",
|
||||
"Saxen",
|
||||
"Vattenfall",
|
||||
"Enkel skottkärra",
|
||||
"Svår skottkärra",
|
||||
"Balettdansösen",
|
||||
"Deep Stick",
|
||||
"Fjärilen",
|
||||
"Maneten",
|
||||
"Body guard",
|
||||
"Leg Glider",
|
||||
"Korset",
|
||||
"Arken",
|
||||
"Borren",
|
||||
"Dansaren",
|
||||
"Trappa till himlen",
|
||||
"Kringlan",
|
||||
"Den Stående Draken"
|
||||
];
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
foreach($this->_list as $value) {
|
||||
Word::create([
|
||||
'value' => $value,
|
||||
'type' => 'sex'
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
38
database/seeds/WordsTableYogaSeeder.php
Normal file
38
database/seeds/WordsTableYogaSeeder.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Word;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class WordsTableYogaSeeder extends Seeder
|
||||
{
|
||||
protected $_list = [
|
||||
"Nedåtgående hund",
|
||||
"Högt utfall",
|
||||
"Lågt utfall",
|
||||
"Glada barnet",
|
||||
"Halvmånen",
|
||||
"Sittande halv ryggradsrotation",
|
||||
"Omvänd bordspositon",
|
||||
"Halv stående framåtfällning",
|
||||
"Kråkan",
|
||||
"Kobran",
|
||||
"Bananen",
|
||||
"Fyrsidig Stavposition",
|
||||
"Kopositionen"
|
||||
];
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
foreach($this->_list as $value) {
|
||||
Word::create([
|
||||
'value' => $value,
|
||||
'type' => 'yoga'
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in a new issue