:3
This commit is contained in:
24
app/Models/Company.php
Normal file
24
app/Models/Company.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Company extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// Define fillable fields for mass assignment
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'logo',
|
||||
'website',
|
||||
];
|
||||
|
||||
public function employees()
|
||||
{
|
||||
return $this->hasMany(Employee::class);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user