uff muchas cosas, agrege projecto y setup

This commit is contained in:
Daniel Cortés
2019-10-14 22:59:22 -03:00
parent 45a441bb2c
commit a7929c0097
36 changed files with 334 additions and 147 deletions

View File

@@ -0,0 +1,13 @@
<?php
/* @var $factory \Illuminate\Database\Eloquent\Factory */
use App\Model;
use Faker\Generator as Faker;
$factory->define(App\Project::class, function (Faker $faker) {
return [
'title' => $faker->words(5, true),
'md' => $faker->paragraphs(10, true)
];
});

View File

@@ -0,0 +1,13 @@
<?php
/* @var $factory \Illuminate\Database\Eloquent\Factory */
use App\Model;
use Faker\Generator as Faker;
$factory->define(App\Setup::class, function (Faker $faker) {
return [
'title' => $faker->words(5, true),
'md' => $faker->paragraphs(10, true)
];
});

View File

@@ -28,7 +28,7 @@ class CreateBaseDb extends Migration
$table->timestamps();
});
Schema::create('setup', function(Blueprint $table) {
Schema::create('setups', function(Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->longText('md');
@@ -41,5 +41,6 @@ class CreateBaseDb extends Migration
Schema::dropIfExists('projects');
Schema::dropIfExists('now');
Schema::dropIfExists('posts');
Schema::dropIfExists('setups');
}
}

View File

@@ -8,5 +8,7 @@ class DatabaseSeeder extends Seeder
{
$this->call(PostTableSeeder::class);
$this->call(NowTableSeeder::class);
$this->call(SetupTableSeeder::class);
$this->call(ProjectTableSeeder::class);
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Illuminate\Database\Seeder;
class ProjectTableSeeder extends Seeder
{
public function run()
{
factory(App\Project::class, 50)->create();
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Illuminate\Database\Seeder;
class SetupTableSeeder extends Seeder
{
public function run()
{
factory(App\Setup::class, 50)->create();
}
}