changed dependencies
This commit is contained in:
@@ -22,3 +22,15 @@ $factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Veranstaltung::class, function(Faker\Generator $faker) {
|
||||
|
||||
$date = $faker->dateTime($min = 'now');
|
||||
return [
|
||||
'name' => $faker->randomElement($array = array('Theaterstück 1', 'Probe 5', 'Sinfonieorchester 20')),
|
||||
'beginn' => $date,
|
||||
'ende' => $date->add(new DateInterval("PT4H")),
|
||||
'gaeste' => $faker->numberBetween($min = 100, $max = 800),
|
||||
'hinweise' => $faker->text()
|
||||
];
|
||||
});
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateArbeitszeitsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class VeranstaltungTableAddEnde extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('veranstaltungen', function (Blueprint $table) {
|
||||
$table->dateTime('ende')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('veranstaltungen', function (Blueprint $table) {
|
||||
$table->dropColumn('ende');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class VeranstaltungSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
factory(App\Veranstaltung::class, 10)->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user