File manager - Edit - /var/www/html/homologBancodetalentos/app/Models/TalentBank/Company.php
Back
<?php namespace App\Models\TalentBank; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; class Company extends Model { use HasFactory; protected $fillable = [ 'cnpj', 'corporate_name', 'trading_name', 'occupation_area', 'county', 'cnae', 'logo', 'description', 'address', 'zip_code', 'neighbourhood_id', 'telephone', 'cellphone', 'contact_name', 'email', 'module_id', 'module_name', 'email_notifications_enabled', 'active', 'last_login_at', 'profile_completed_at', ]; protected $casts = [ 'active' => 'boolean', 'email_notifications_enabled' => 'boolean', 'last_login_at' => 'datetime', 'profile_completed_at' => 'datetime', ]; public function isProfileComplete(): bool { return $this->profile_completed_at !== null; } public function markProfileComplete(): void { if ($this->profile_completed_at === null) { $this->profile_completed_at = now(); $this->save(); } } public function neighbourhood(): BelongsTo { return $this->belongsTo(Neighbourhood::class); } public function jobListings(): HasMany { return $this->hasMany(JobListing::class); } public function notifications(): HasMany { return $this->hasMany(CompanyNotification::class); } public function unreadNotifications(): HasMany { return $this->hasMany(CompanyNotification::class)->where('read', false); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings