Car registration work
This commit is contained in:
parent
e035800373
commit
7cdea664e1
18
app/Models/Types.php
Normal file
18
app/Models/Types.php
Normal 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
23
app/Models/Vehicles.php
Normal 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'
|
||||||
|
];
|
||||||
|
}
|
@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class vehicles extends Model
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
@ -15,11 +15,12 @@ class CreateVehiclesTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('vehicles', function (Blueprint $table) {
|
Schema::create('vehicles', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('year');
|
$table->year('year');
|
||||||
$table->string('make');
|
$table->string('make');
|
||||||
$table->string('model');
|
$table->string('model');
|
||||||
$table->string('type');
|
$table->string('type');
|
||||||
$table->boolean('doNotJudge');
|
$table->boolean('doNotJudge');
|
||||||
|
$table->integer('owner');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
32
database/migrations/2019_02_13_162647_create_types_table.php
Normal file
32
database/migrations/2019_02_13_162647_create_types_table.php
Normal 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');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user