/home/techb158/ileadtechnology.com/SSM/app/Models/transport/vehicle
NameSizeModeActions
Vehicle.php34790644editdlrm
VehicleDocument.php22040644editdlrm
VehicleFuel.php22990644editdlrm
VehicleIncharge.php15930644editdlrm
VehicleLog.php20090644editdlrm
VehiclePerformanceCriteria.php19570644editdlrm
VehicleServiceRecord.php26900644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/transport/vehicle/VehicleDocument.php (2204B)
'array', 'date_of_expiry' => 'date']; protected $primaryKey = 'id'; protected $table = 'vehicle_documents'; protected static $logName = 'vehicle_document'; protected static $logFillable = true; protected static $logOnlyDirty = true; protected static $ignoreChangedAttributes = ['updated_at']; public function vehicle() { return $this->belongsTo('App\Models\Transport\Vehicle\Vehicle'); } public function vehicleDocumentType() { return $this->belongsTo('App\Models\Configuration\Transport\Vehicle\VehicleDocumentType'); } public function getOption(string $option) { return array_get($this->options, $option); } public function scopeInfo($q) { return $q->with('vehicle', 'vehicleDocumentType'); } public function scopeFilterById($q, $id) { if (! $id) { return $q; } return $q->where('id', '=', $id); } public function scopeFilterByVehicleId($q, $vehicle_id) { if (! $vehicle_id) { return $q; } return $q->where('vehicle_id', '=', $vehicle_id); } public function scopeFilterByVehicleDocumentTypeId($q, $vehicle_document_type_id) { if (! $vehicle_document_type_id) { return $q; } return $q->where('vehicle_document_type_id', '=', $vehicle_document_type_id); } public function scopeFilterByTitle($q, $title, $s = 0) { if (! $title) { return $q; } return $s ? $q->where('title', '=', $title) : $q->where('title', 'like', '%'.$title.'%'); } }