GithubHelp home page GithubHelp logo

laravel-html-minify's Introduction

laravel-html-minify's People

Contributors

bhavingajjar avatar dipeshsukhia avatar genericmilk avatar laravel-shift avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-html-minify's Issues

view:cache command error in v3.3.4

Hello, there is a problem with the new v3.3.4.

I'm getting an error with php8.2 artisan view:cache command.

After the package is upgraded to the new version (Upgrading dipeshsukhia/laravel-html-minify (v3.3.3 => v3.3.4)), I get an error with the dynamic component, after downgrading back to v.3.3.3, the error is gone.
I mean with the previous version, the command was executed successfully INFO Blade templates cached successfully..
I checked twice.

I'm not sure what exactly goes on here, and why after your package upgraded Filament's related component 'dynamic-component' is unavailable, anyway can you help me with that, please?

PHP 8.2.0
Laravel 10.48.13
Filament 2.17.56

 InvalidArgumentException 

  Unable to locate a class or view for component [dynamic-component].

  at vendor/laravel/framework/src/Illuminate/View/Compilers/ComponentTagCompiler.php:311
    307โ–•         if (Str::startsWith($component, 'mail::')) {
    308โ–•             return $component;
    309โ–•         }
    310โ–• 
  โžœ 311โ–•         throw new InvalidArgumentException(
    312โ–•             "Unable to locate a class or view for component [{$component}]."
    313โ–•         );
    314โ–•     }
    315โ–• 

      +2 vendor frames 

  3   [internal]:0
      Illuminate\View\Compilers\ComponentTagCompiler::Illuminate\View\Compilers\{closure}()
      +8 vendor frames 

  12  [internal]:0
      Illuminate\Foundation\Console\ViewCacheCommand::Illuminate\Foundation\Console\{closure}(Object(Symfony\Component\Finder\SplFileInfo), "/Users/rchutchev/SERVER/redsealine.local/links/resources/views/filament/forms/components/image.blade.php")

The file contains this code

@php
    /**
    * @var $getDatalistOptions
    * @var $errors
    * @var $getStatePath
    * @var $getState
    **/

    $datalistOptions = $getDatalistOptions();

    $affixLabelClasses = [
        'whitespace-nowrap group-focus-within:text-primary-500',
        'text-gray-400' => ! $errors->has($getStatePath()),
        'text-danger-400' => $errors->has($getStatePath()),
    ];
@endphp

<x-dynamic-component
    :component="$getFieldWrapperView()"
    :id="$getId()"
    :label="$getLabel()"
    :label-sr-only="$isLabelHidden()"
    :helper-text="$getHelperText()"
    :hint="$getHint()"
    :hint-action="$getHintAction()"
    :hint-color="$getHintColor()"
    :hint-icon="$getHintIcon()"
    :required="$isRequired()"
    :state-path="$getStatePath()"
>
    <div
        {{
            $attributes
                ->merge($getExtraAttributes())
                ->class(['filament-forms-text-input-component group flex items-center space-x-2 rtl:space-x-reverse'])
        }}
    >
        @if (($prefixAction = $getPrefixAction()) && (! $prefixAction->isHidden()))
            {{ $prefixAction }}
        @endif

        @if ($icon = $getPrefixIcon())
            <x-dynamic-component :component="$icon" class="h-5 w-5" />
        @endif

        @if (filled($label = $getPrefixLabel()))
            <span @class($affixLabelClasses)>
                {{ $label }}
            </span>
        @endif

        <div class="flex-1">
            @php
                if($getState()){
                    $regex = preg_match("/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?ยซยปโ€œโ€โ€˜โ€™]))/", $getState());
                    if ($regex){
            @endphp
            <img src='{{ $getState() }}' size="" class="rounded-full" alt="{{ $getState() }}" />
            @php
                } else {
            @endphp
            <img src='/storage/{{ $getState() }}' size="" class="rounded-full" alt="{{ $getState() }}" />
            @php
                }
            }
            @endphp
        </div>

        @if (filled($label = $getSuffixLabel()))
            <span @class($affixLabelClasses)>
                {{ $label }}
            </span>
        @endif

        @if ($icon = $getSuffixIcon())
            <x-dynamic-component :component="$icon" class="h-5 w-5" />
        @endif

        @if (($suffixAction = $getSuffixAction()) && (! $suffixAction->isHidden()))
            {{ $suffixAction }}
        @endif
    </div>

    @if ($datalistOptions)
        <datalist id="{{ $getId() }}-list">
            @foreach ($datalistOptions as $option)
                <option value="{{ $option }}"></option>
            @endforeach
        </datalist>
    @endif
</x-dynamic-component>

Error page is empty

I have set in .env HTML_MINIFY = true,
but when my controller had error, the error page shows nothing, just empty black page

And if I set HTML_MINIFY = false, the error page is normal, shows everything about error

How can i exclude error page ?

Package remove space after coma

Hi, I have a problem with minimizing a text with list if the comma is placed after the parenthesis

Before minify
Google (search engine), Facebook (social network)
After minify
Google (search engine),Facebook (social network)

Particular Html

Hello, can you teach me how to use "for particular html part", where should I put it? thanks.

Question; can we also exclude?

Is there also a trick to exclude certain parts? Just like this, but the other way around:
#7 (comment)

For example:
LaravelHtmlMinifyFacade::htmlMinifyExclude(@include('DoNotMinifyThisFile.css'));

Thanks

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.