Attachment
#2870
Replies: 1 comment
-
I solved this changing Upload for a simple input file, and it works to me
my method is /**
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a problem with attachments linked to a template. I'm using the following code for the form
`public function layout(): iterable
{
$machine = new Machine();
the model is the following
`<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Validation\Rule;
use Orchid\Access\RoleAccess;
use Orchid\Attachment\Attachable;
use Orchid\Attachment\Models\Attachment;
use Orchid\Filters\Filterable;
use Orchid\Filters\Types\Like;
use Orchid\Filters\Types\Where;
use Orchid\Screen\AsSource;
class Maintenance extends Model
{
use HasFactory, AsSource, Filterable, RoleAccess, Attachable;
}
`
the files are saved and the attachment table is populated but when I try to recover the files the array is empty.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions