You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `attachFile()` method returns a FileAttachment model so you can set the category, description, etc. Only call the `save()` method if you change any attributes.
273
+
274
+
You can also attach a file to a field by specifying the name of the field. This is used throughout Pace for logos, photos, layouts, etc.
Files attached to a model are retrieved via a special relationship method. It behaves the same as a "has many" relationship and returns an `XPath\Builder` instance.
284
+
285
+
```php
286
+
$attachments = $job->fileAttachments()->get();
287
+
```
288
+
289
+
Use a `filter()` to limit the results to one field or one type of file.
0 commit comments