File manager - Edit - /var/www/html/portal/app/Models/Siati/Companie.php
Back
<?php namespace App\Models\Siati; use App\Models\SystemLog; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Notifications\Notifiable; use Laravel\Sanctum\HasApiTokens; use Illuminate\Support\Str; use DateTimeInterface; class Companie extends Model { use HasApiTokens, HasFactory, Notifiable; protected $connection = 'mysql_siati_app'; protected $table = 'companies'; const CREATED_AT = 'created_at'; const UPDATED_AT = 'updated_at'; protected $fillable = [ 'id', 'cnpj', 'corporate_name', 'trading_name', 'occupation_area', 'county', 'logo', 'description', 'cnae', 'address', 'zip_code', 'neighbourhood_id ', 'cellphone', 'contact_name', 'email', 'module_id', 'module_name', 'active', 'created_at', 'updated_at', ]; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function neighbourhood() { return $this->belongsTo(Neighbourhood::class, 'neighbourhood_id'); } public function logs() { return $this->hasMany(SystemLog::class, 'model_id', 'id') ->where('model', 'siati_app->companies'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings