Initial V2 commit
This commit is contained in:
27
app/Models/WaitingRide.php
Normal file
27
app/Models/WaitingRide.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class WaitingRide extends Model {
|
||||
protected $connection = 'primary';
|
||||
protected $table = 'waitingRides';
|
||||
protected $primaryKey = 'id';
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
protected $fillable = [
|
||||
'id', 'start_location', 'start_lat', 'start_lng', 'end_location',
|
||||
'end_lat', 'end_lng', 'date', 'time', 'price', 'passenger_id',
|
||||
'status', 'carType', 'passengerRate', 'created_at',
|
||||
'price_for_passenger', 'distance', 'duration', 'payment_method',
|
||||
'passenger_wallet',
|
||||
];
|
||||
protected $casts = [
|
||||
'start_lat' => 'decimal:7', 'start_lng' => 'decimal:7',
|
||||
'end_lat' => 'decimal:7', 'end_lng' => 'decimal:7',
|
||||
'price' => 'decimal:2', 'price_for_passenger' => 'decimal:2',
|
||||
];
|
||||
public function scopeWaiting($query) {
|
||||
return $query->where('status', 'waiting');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user