Added a basic route to the index page of all people. Added views and controller for this purpose.
52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreatePeopleTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('people', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
|
|
// Name
|
|
$table->enum('title', array('Herr', 'Frau', 'Firma'));
|
|
$table->string('name_or_company');
|
|
$table->string('surname')->nullable();
|
|
|
|
// Date of birth
|
|
$table->date('date_of_birth')->nullable()->default();
|
|
|
|
// Adress
|
|
$table->string('city')->nullable();
|
|
$table->string('street')->nullable();
|
|
$table->string('postal_code')->nullable();
|
|
|
|
// Further contact information
|
|
$table->string('email')->nullable();
|
|
$table->string('mobile')->nullable();
|
|
$table->string('phone')->nullable();
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('person_targets');
|
|
Schema::dropIfExists('people');
|
|
}
|
|
}
|