You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
422 B
20 lines
422 B
<?php
|
|
|
|
namespace App\Entities\Agencies;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Agency extends Model
|
|
{
|
|
protected $fillable = ['name', 'email', 'address', 'phone', 'website', 'owner_id'];
|
|
|
|
public function owner()
|
|
{
|
|
return $this->belongsTo('App\Entities\Users\User');
|
|
}
|
|
|
|
public function projects()
|
|
{
|
|
return $this->hasMany('App\Entities\Projects\Project', 'owner_id');
|
|
}
|
|
}
|