Create routes and views for suppliers.

This commit is contained in:
2025-02-10 12:47:57 +01:00
parent 3f07d333df
commit 7c085dfa6b
12 changed files with 664 additions and 12 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
class Supplier extends Model
{
@@ -28,6 +27,22 @@ class Supplier extends Model
'contact_email',
];
/**
* The attributes that are appended with attribute getters.
*
* @var string[]
*/
protected $appends = [
'created',
];
/**
* Get the issue_date attribute in local time format.
*/
public function getCreatedAttribute(): string
{
return $this->created_at->format('d.m.Y');
}
/**
* Get the supplier's incoming invoices.
*/