mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 20:51:09 -04:00
v5.0.0 update
This commit is contained in:
@ -11,6 +11,11 @@ class Note extends Model
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function scopeApplyFilters($query, array $filters)
|
||||
{
|
||||
$filters = collect($filters);
|
||||
@ -33,4 +38,9 @@ class Note extends Model
|
||||
{
|
||||
return $query->where('type', $type);
|
||||
}
|
||||
|
||||
public function scopeWhereCompany($query)
|
||||
{
|
||||
$query->where('notes.company_id', request()->header('company'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user