Sami
07/06/2022, 2:07 PM$this->fileObject(<file role>)->uuid)
and prefix this with path to the files folderdedli
07/06/2022, 2:21 PMdedli
07/06/2022, 2:22 PMSami
07/06/2022, 2:25 PMgetFormFields()
- just add the link to the array and in view you should be able to access itSami
07/06/2022, 2:25 PMgetIndexData()
would work too but I haven't used it before
EDIT: better from @ifox: https://discord.com/channels/811936425858695198/811986149064441927/994256541479870554dedli
07/06/2022, 2:31 PM24kappa
07/06/2022, 2:40 PMconfig/twill.php
in block_editor
i've added
'directories' => [
'source' => [
'icons' => [
base_path('assets/admin/icons'),
resource_path('assets/admin/icons'),
],
],
],
i can see the icons if i go to https://admin.site.dev/admin/icons but i can't see anymore the block editor button . Maybe I'm doing something wrong with the configurationsifox
07/06/2022, 2:59 PMifox
07/06/2022, 3:00 PM$item
in the form view to render anything you'd like from the model @dedliifox
07/06/2022, 3:00 PM24kappa
07/06/2022, 3:02 PM'directories' => [
'source' => [
'icons' => [
base_path('vendor/area17/twill/frontend/icons'),
resource_path('assets/admin/icons'),
],
],
],
ifox
07/06/2022, 3:02 PMSami
07/06/2022, 3:05 PM24kappa
07/06/2022, 3:05 PM24kappa
07/06/2022, 3:05 PMifox
07/06/2022, 3:08 PMifox
07/06/2022, 3:08 PMviews/admin/icons
Sami
07/06/2022, 3:13 PMdedli
07/06/2022, 3:14 PM24kappa
07/06/2022, 3:15 PM'directories' => [
'source' => [
'blocks' => [
[
'path' => base_path('vendor/area17/twill/src/Commands/stubs/blocks'),
'source' => A17\Twill\Services\Blocks\Block::SOURCE_TWILL,
],
[
'path' => resource_path('views/admin/blocks'),
'source' => A17\Twill\Services\Blocks\Block::SOURCE_APP,
],
],
'repeaters' => [
[
'path' => resource_path('views/admin/repeaters'),
'source' => A17\Twill\Services\Blocks\Block::SOURCE_APP,
],
[
'path' => base_path('vendor/area17/twill/src/Commands/stubs/repeaters'),
'source' => A17\Twill\Services\Blocks\Block::SOURCE_TWILL,
],
],
'icons' => [
base_path('vendor/area17/twill/frontend/icons'),
resource_path('assets/admin/icons'),
],
],
this worked, so i have to override all the config keys?ifox
07/06/2022, 3:23 PMifox
07/06/2022, 3:23 PMifox
07/06/2022, 3:24 PM24kappa
07/06/2022, 3:24 PM24kappa
07/06/2022, 3:26 PMphp artisan twill:list:icons
but the new icons are not available on blocks.ifox
07/06/2022, 3:28 PM24kappa
07/06/2022, 3:29 PMSami
07/06/2022, 5:03 PMdedli
07/06/2022, 5:38 PMadmin/documents/create.blade.php
@include('twill::partials.create')
@formField('input', ['name' => 'parent_id','label' => 'Id батьківського ресурсу'])
@formField('date_picker', [ 'name' => 'published_at', 'label' => 'Дата публікації', 'withTime' => false ])
@formField('files', [ 'name' => 'file', 'label' => 'Документ',])
JeanSilva
07/06/2022, 5:42 PM