ifox
06/22/2021, 10:41 AMobfuscate
06/22/2021, 10:45 AMifox
06/22/2021, 10:48 AMifox
06/22/2021, 10:50 AM'sectorsList' => app(SectorRepository::class)->listAll('title'),
'disciplinesList' => app(DisciplineRepository::class)->listAll('title'),
ifox
06/22/2021, 10:50 AMformData
ifox
06/22/2021, 10:51 AM$object->disciplines()->sync($fields['disciplines'] ?? []);
$object->sectors()->sync($fields['sectors'] ?? []);
ifox
06/22/2021, 10:52 AMafterSave
obfuscate
06/22/2021, 10:52 AMantonioribeiro
06/22/2021, 3:19 PM@if(config('twill.dev_mode', false))
{!! file_get_contents(twillAsset('icons.svg')) !!}
{!! file_get_contents(twillAsset('icons-files.svg')) !!}
{!! file_get_contents(twillAsset('icons-wysiwyg.svg')) !!}
@else
{!! File::exists(public_path(twillAsset('icons.svg'))) ? File::get(public_path(twillAsset('icons.svg'))) : '' !!}
{!! File::exists(public_path(twillAsset('icons-files.svg'))) ? File::get(public_path(twillAsset('icons-files.svg'))) : '' !!}
{!! File::exists(public_path(twillAsset('icons-wysiwyg.svg'))) ? File::get(public_path(twillAsset('icons-wysiwyg.svg'))) : '' !!}
@endif
The problem is that Vapor deletes all files from the public directory (they are uploaded to S3 during deployment) and we don't see a way of telling it to not do it unless we fork the vapor-cli
script and change it ourselves.
At the same time Twill expects the SVG files to be present on /public
. Even if we overload twillAsset()
to load those files from a different directory (we would also have to copy those files during build to this directory), Twill is still expecting them to be inside /public
, and we are also looking to do something simpler. Any ideas?
Cheers!ifox
06/22/2021, 6:41 PMvianney
06/22/2021, 7:12 PMifox
06/22/2021, 7:14 PMvianney
06/22/2021, 7:14 PMifox
06/22/2021, 7:16 PMifox
06/22/2021, 7:16 PMvianney
06/22/2021, 7:17 PMifox
06/22/2021, 7:17 PMvianney
06/22/2021, 7:18 PMifox
06/22/2021, 7:18 PMifox
06/22/2021, 7:19 PMifox
06/22/2021, 7:20 PMvianney
06/22/2021, 7:22 PMifox
06/22/2021, 7:24 PMifox
06/22/2021, 7:26 PMDmi3yy
06/23/2021, 10:08 AMDmi3yy
06/23/2021, 10:08 AMuser
06/23/2021, 10:20 AMifox
06/23/2021, 10:20 AMifox
06/23/2021, 10:20 AMifox
06/23/2021, 10:21 AM