![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/Corals/modules/RentPix/Models/ |
<?php namespace Corals\Modules\RentPix\Models; use Corals\Foundation\Models\BaseModel; use Corals\Foundation\Transformers\PresentableTrait; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class Driver extends BaseModel { use PresentableTrait; /** * Model configuration. * * @var string */ public $config = 'rentPix.models.driver'; protected $casts = [ 'properties' => 'json', ]; protected $table = 'pix_drivers'; protected $guarded = ['id']; /** * @return BelongsToMany */ public function customers() { return $this->belongsToMany(Customer::class, 'pix_driver_customer') ->withTimestamps() ->withPivot(['properties']); } /** * @return BelongsToMany */ public function reservations() { return $this->belongsToMany(Reservation::class, 'pix_driver_reservation') ->withTimestamps() ->withPivot(['is_primary', 'properties']); } /** * @return BelongsToMany */ public function inspections() { return $this->belongsToMany(Inspection::class, 'pix_driver_inspection') ->withTimestamps() ->withPivot(['is_primary', 'properties']); } }