From 9d1a810fa983a045294e6d0b8ad761f5dbfb8939 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Wed, 5 Dec 2018 17:31:36 +0100
Subject: Initial commit (actually already finished)

---
 database/.gitignore                                |  1 +
 database/factories/UserFactory.php                 | 24 ++++++++++++++++
 .../2018_12_05_152926_create_quotes_table.php      | 33 ++++++++++++++++++++++
 database/seeds/DatabaseSeeder.php                  | 16 +++++++++++
 4 files changed, 74 insertions(+)
 create mode 100644 database/.gitignore
 create mode 100644 database/factories/UserFactory.php
 create mode 100644 database/migrations/2018_12_05_152926_create_quotes_table.php
 create mode 100644 database/seeds/DatabaseSeeder.php

(limited to 'database')

diff --git a/database/.gitignore b/database/.gitignore
new file mode 100644
index 0000000..9b1dffd
--- /dev/null
+++ b/database/.gitignore
@@ -0,0 +1 @@
+*.sqlite
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
new file mode 100644
index 0000000..ec15e58
--- /dev/null
+++ b/database/factories/UserFactory.php
@@ -0,0 +1,24 @@
+<?php
+
+use Faker\Generator as Faker;
+
+/*
+|--------------------------------------------------------------------------
+| Model Factories
+|--------------------------------------------------------------------------
+|
+| This directory should contain each of the model factory definitions for
+| your application. Factories provide a convenient way to generate new
+| model instances for testing / seeding your application's database.
+|
+*/
+
+$factory->define(App\User::class, function (Faker $faker) {
+    return [
+        'name' => $faker->name,
+        'email' => $faker->unique()->safeEmail,
+        'email_verified_at' => now(),
+        'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
+        'remember_token' => str_random(10),
+    ];
+});
diff --git a/database/migrations/2018_12_05_152926_create_quotes_table.php b/database/migrations/2018_12_05_152926_create_quotes_table.php
new file mode 100644
index 0000000..b20d4e1
--- /dev/null
+++ b/database/migrations/2018_12_05_152926_create_quotes_table.php
@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateQuotesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('quotes', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('quote');
+            $table->string('quotist'); // NEOLOGISM - the one who said the quote
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('quotes');
+    }
+}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
new file mode 100644
index 0000000..91cb6d1
--- /dev/null
+++ b/database/seeds/DatabaseSeeder.php
@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class DatabaseSeeder extends Seeder
+{
+    /**
+     * Seed the application's database.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        // $this->call(UsersTableSeeder::class);
+    }
+}
-- 
cgit v1.2.3