feat: add all Eloquent models with relationships
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class CashCategory extends Model
|
||||
{
|
||||
protected $fillable = ['name'];
|
||||
|
||||
public function records(): HasMany
|
||||
{
|
||||
return $this->hasMany(CashRecord::class, 'category_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user