David Bomba 95f1d24b8f
Access module relations from parent (#2553)
* Refactor JS directory structure

* Access Module relations from Parent entity
2018-12-13 22:01:33 +11:00

30 lines
427 B
PHP

<?php
namespace Modules\Notes\Entities;
use Illuminate\Database\Eloquent\Model;
class Note extends Model
{
/*
protected $guarded = [
'id',
];
*/
protected $fillable = ["description"];
protected $table = 'notes';
public function client()
{
return $this->hasOne(App\Models\Client::class);
}
public function notes()
{
return $this->hasMany(Note::class);
}
}