*/ use HasFactory; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'address', 'ico', 'contact', 'hiring' ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'created_at', 'updated_at', ]; /** * Get the internships for the company. */ public function internships() { return $this->hasMany(Internship::class, 'company_id'); } /** * Get the contact person (user) for the company. */ public function contact() { return $this->belongsTo(User::class, 'contact'); } }