Giter Site home page Giter Site logo

gotime's Introduction

Total Downloads Latest Stable Version License

NAYKEL Gotime

Starter package for NayKel Laravel applications.

Installation

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

Known Issues

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==';
}

Mount the resources or create a blank model

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.

Adding the main image

The $tmpImage variable is set in the trait as there will be no need to manually use it. ??

The image paramt

  1. Set the $disk or leave blank for public ????

Defined attributed in the trait can be reset or overrider in the mount() method of the main component

Things I learned the Hard Way

Do not define a variable data type that is a file as a string. Why? It's a file, not a string!

CkEditor

<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

Adding New Icons

  1. update extension svg to blade.php
find ./resources/views/components/v2/icon -name "*.svg" -type f -exec bash -c 'mv -- "$0" "${0%.svg}.blade.php"' {} \;
  1. add $attributes, width and height
# 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' {} +

gotime's People

Contributors

naykel76 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.