File manager - Edit - /var/www/html/portal/app/Models/FluxoOnibus.php
Back
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class FluxoOnibus extends Model { use HasFactory; protected $connection = 'mysql_turismo_nautico'; protected $table = 'fluxo_onibus'; protected $primaryKey = 'id'; protected $keyType = 'string'; public $incrementing = false; protected $fillable = [ 'owner_id', 'categoria', 'status', 'tel_guia', 'cpf_guia', 'data_chegada', 'horario_chegada', 'data_retorno', 'horario_retorno', 'origem', 'nr_passageiros', 'empresa', 'veiculo', 'cnpj', 'placa_veiculo', 'tel_empresa', 'tel2', 'email_licenca', 'nome_guia', 'reg_cadastur', 'email_guia', 'nome_fantasia_angra', 'cnpj_receptivo', 'razao_social', 'responsavel', 'observacao', 'upload', 'valor', ]; protected $casts = [ 'data_chegada' => 'date', 'data_retorno' => 'date', 'horario_chegada' => 'string', 'horario_retorno' => 'string', 'nr_passageiros' => 'integer', 'valor' => 'decimal:2', ]; protected $dates = [ 'data_chegada', 'data_retorno', 'created_at', 'updated_at', ]; public function user() { return $this->belongsTo(\App\Models\User::class, 'owner_id', 'id'); } public function getPertenceAttribute() { return $this->user ? $this->user->pertence : null; } public function getEnderecoAttribute() { return $this->user ? $this->user->endereco()->first() : null; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.1 |
proxy
|
phpinfo
|
Settings