I'm Dipesh Sukhia, Software Developer extraordinaire. Welcome to my GitHub profile.
From INDIA ๐ฎ๐ณ .
Email: [email protected]
Website: dipeshsukhia.github.io
laravel minify html output
License: MIT License
I'm Dipesh Sukhia, Software Developer extraordinaire. Welcome to my GitHub profile.
From INDIA ๐ฎ๐ณ .
Email: [email protected]
Website: dipeshsukhia.github.io
Hello, there is a problem with the new v3.3.4.
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>
Please, update to Laravel 10, the extension is just great!
Please, update to Laravel 9, the extension is just great!
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 ?
Before minify
<div class="header-top">
After minify
<div class=header-top>
How i return " in class?
hello
do this package work once in compiled?
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)
Hello, can you teach me how to use "for particular html part", where should I put it? thanks.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.