- add ProjectsTableSeeder.php
- project label: allow 10 chars
This commit is contained in:
parent
4b5136ab9b
commit
54edfb4617
|
@ -25,7 +25,7 @@ class ProjectRequest extends Request
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'name' => 'required|min:3|max:255',
|
'name' => 'required|min:3|max:255',
|
||||||
'label' => 'required|min:3|max:10',
|
'label' => 'required|min:3|max:20',
|
||||||
'description' => 'required'
|
'description' => 'required'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CreateProjectsTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('projects', function (Blueprint $table) {
|
Schema::create('projects', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('label', 10);
|
$table->string('label', 20);
|
||||||
$table->string('name', 255);
|
$table->string('name', 255);
|
||||||
$table->string('description', 255)->nullable();
|
$table->string('description', 255)->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
|
@ -30,6 +30,7 @@ class DatabaseSeeder extends Seeder
|
||||||
$this->call('LanguagesTableSeeder');
|
$this->call('LanguagesTableSeeder');
|
||||||
$this->call('PagesTableSeeder');
|
$this->call('PagesTableSeeder');
|
||||||
$this->call('CollectionsTableSeeder');
|
$this->call('CollectionsTableSeeder');
|
||||||
|
$this->call('ProjectsTableSeeder');
|
||||||
$this->command->info('User table seeded!');
|
$this->command->info('User table seeded!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
26
database/seeds/ProjectsTableSeeder.php
Normal file
26
database/seeds/ProjectsTableSeeder.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class ProjectsTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::table('projects')->insert([
|
||||||
|
[
|
||||||
|
'label' => 'ALLG_FACHLICH',
|
||||||
|
'name' => 'Allgemein fachliche Arbeiten',
|
||||||
|
'description' => 'Allgemein fachlich interdisziplinäre Arbeiten',
|
||||||
|
'created_at' => Carbon::now(),
|
||||||
|
'updated_at' => Carbon::now(),
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user