Initial commit - Car Rental Management System
This commit is contained in:
commit
f72173377a
100 files changed
+15201
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Service extends Model
|
||||
{
|
||||
protected $fillable = ['car_id', 'type', 'description', 'cost', 'service_date', 'next_service_date', 'mileage_at_service', 'status'];
|
||||
|
||||
protected $casts = [
|
||||
'service_date' => 'date',
|
||||
'next_service_date' => 'date',
|
||||
];
|
||||
|
||||
public function car()
|
||||
{
|
||||
return $this->belongsTo(Car::class);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user