Initial commit - Car Rental Management System

This commit is contained in:
Innovator committed 2026-02-19 22:05:20 +00:00
commit f72173377a
100 files changed
+15201

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Rental extends Model
{
protected $fillable = ['car_id', 'customer_id', 'start_date', 'end_date', 'total_amount', 'advance_payment', 'status', 'notes', 'rental_type', 'pickup_time', 'return_time', 'customer_signature'];
protected $casts = [
'start_date' => 'date',
'end_date' => 'date',
'pickup_time' => 'datetime:H:i',
'return_time' => 'datetime:H:i',
];
public function car()
{
return $this->belongsTo(Car::class);
}
public function customer()
{
return $this->belongsTo(Customer::class);
}
public function payments()
{
return $this->hasMany(Payment::class);
}
}