Replies: 2 comments 4 replies
-
Hello @ctocph, The argument you pass into the file method should be that of your file field name. So if you use: @formField('files', [
'name' => 'single_file',
'label' => 'Single file',
'note' => 'Add one file (per language)'
]) Then you can get the file using: $service->file('single_file'); Of if you allow multiple files you can use: $service->filesList('fieldname'); |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks @haringsrob. I think this will work. But I found out the files object is empty.
Setup a new CMS menu item in config/twill-navigation.php:
File can be seen in the files table in the database Feels like something else needs to be added that the twill:make:module is not adding. namespace App\Models; use A17\Twill\Models\Behaviors\HasTranslation; class Testingfile extends Model implements Sortable
} namespace App\Repositories; use A17\Twill\Repositories\Behaviors\HandleTranslations; class TestingfileRepository extends ModuleRepository
} Last but not least I added this: @section('contentFields') thanks |
Beta Was this translation helpful? Give feedback.
-
Hello,
I've added files to a module etc following https://twill.io/docs/form-fields/files.html#files
So all in that guide is done.
Now, I want to make it show in the blade file...and there is no documentation with examples on how to do that
Tried something like
<a href="{{ $service->file('name') }}">filename</a>
but it's not coming
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions