changed dependencies

This commit is contained in:
chrosey
2017-06-11 22:17:12 +02:00
parent 5e8d1898bc
commit 46e092f04f
6 changed files with 92 additions and 2 deletions
+12
View File
@@ -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');
});
}
}
+16
View File
@@ -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();
}
}