Car registration work

This commit is contained in:
Russ Long 2019-02-13 16:36:47 -05:00
parent e035800373
commit 7cdea664e1
5 changed files with 75 additions and 11 deletions

18
app/Models/Types.php Normal file
View File

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Types extends Model
{
protected $table = 'types';
protected $fillable = [
'type_name'
];
protected $dates = [
'created_at',
'updated_at'
];
}

23
app/Models/Vehicles.php Normal file
View File

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class vehicles extends Model
{
protected $table = 'items';
protected $fillable = [
'year',
'make',
'model',
'type',
'doNotJudge',
'owner'
];
protected $dates = [
'created_at',
'updated_at'
];
}

View File

@ -1,10 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class vehicles extends Model
{
//
}

View File

@ -15,11 +15,12 @@ class CreateVehiclesTable extends Migration
{
Schema::create('vehicles', function (Blueprint $table) {
$table->increments('id');
$table->string('year');
$table->year('year');
$table->string('make');
$table->string('model');
$table->string('type');
$table->boolean('doNotJudge');
$table->integer('owner');
$table->timestamps();
});
}

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('types', function (Blueprint $table) {
$table->increments('id');
$table->string('type_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('types');
}
}