🗄️Adding to models
Settings
Start of by importing the trait in the model you are using
use NaN\NanNotesController\Traits\HasFiles;Model
Add the trait HasFiles to the model you want to use notes on:
class PurchaseOrderLine extends NaNModel {
use HasFiles;
//.....
}After adding it to the model you can mutate noted on the model as a files() relation:
Example:
$PurchaseOrderLine = PurchaseOrderLine::find(1);
$files= $PurchaseOrderLine->files();Last updated