Starter package for NayKel Laravel applications.
To get started, install Gotime using the Composer package manager:
composer require naykel/gotime
Next, install Gotime resources using the gotime:install command:
php artisan gotime:install
The configuration files are merged when the package is registered, however you can optionally publish the naykel.php
configuration file.
php artisan vendor:publish --tag=gotime-config
This driver does not support creating temporary URLs.
https://laracasts.com/discuss/channels/livewire/pdf-passes-image-validation?page=1&replyId=806087
livewire/livewire#3133 (comment)
if (! $this->isPreviewable()) {
// show a missing image icon (?) for files that cannot be previewed
return 'data:image/png;base64...gg-1.5==';
}
Depending on the route, the Livewire component will either mount a resource and set $editing
with route model binding or create a new blank model setting initial values from the $initalValues
array.
The $tmpImage
variable is set in the trait as there will be no need to manually use it. ??
The image paramt
- Set the
$disk
or leave blank forpublic
????
Defined attributed in the trait can be reset or overrider in the mount()
method of the main component
Do not define a variable data type that is a file as a string
. Why? It's a file, not a string!
<div wire:ignore class="frm-row">
<textarea wire:model.blur="editing.description" name="editing.description" id="ckeditor"></textarea>
</div>
@push('scripts')
<script src="https://cdn.ckeditor.com/ckeditor5/27.1.0/classic/ckeditor.js"></script>
<script>
ClassicEditor
.create(document.querySelector('#ckeditor'))
.then(editor => {
editor.model.document.on('change:data', () => {
@this.set('editing.description', editor.getData());
})
})
.catch(error => {
console.error(error);
});
</script>
@endpush
- update extension
svg
toblade.php
find ./resources/views/components/v2/icon -name "*.svg" -type f -exec bash -c 'mv -- "$0" "${0%.svg}.blade.php"' {} \;
- add
$attributes
,width
andheight
# DON'T RUN THIS WITH EXPORTED FIGMA ICONS, IT WILL ADD THE ATTRIBUTES TWICE
find ./resources/views/components/v2/icon -type f -name "*.blade.php" -exec sed -i 's/<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg"/<svg {{ $attributes }} xmlns="http:\/\/www\.w3\.org\/2000\/svg" width="24" height="24"/g' {} +
# FOR FIGMA ICONS
find ./resources/views/components/v2/icon -type f -name "*.blade.php" -exec sed -i 's/<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg"/<svg {{ $attributes }} xmlns="http:\/\/www\.w3\.org\/2000\/svg"/g' {} +