Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Blade Directives

Laravel Blade Directives Laravel Package

appstract/laravel-blade-directives

A handy collection of custom Blade directives for Laravel that cut boilerplate from your views, covering common tasks like authentication checks, formatting, icons, and more. Simple to install and easy to extend with your own directives, keeping templates clean and readable.

View on GitHub
Deep Wiki
Context7

A collection of nice Laravel Blade directives

Frequently asked questions about Laravel Blade Directives
How do I install appstract/laravel-blade-directives in Laravel?
Install it with composer require appstract/laravel-blade-directives and follow the README for any package-specific provider registration or config publishing. Most Laravel packages use package auto-discovery, so you usually will not need to add the service provider manually. Commit the updated composer.json and composer.lock after verifying the resolved Laravel and PHP versions.
Which Laravel versions does appstract/laravel-blade-directives support?
The 1.14.0 release explicitly adds Laravel 10 support through a Composer constraint update, indicating the package tracks Laravel major versions. Review the composer.json diff to confirm whether older Laravel majors were widened or dropped, because a constraint-only note does not tell you the full support window. If you are still on Laravel 8 or 9, verify your version remains allowed before adopting.
What Blade directives does appstract/laravel-blade-directives provide?
The package is described as a collection of custom Blade directives covering common view tasks such as authentication checks, formatting, and icons, plus additional convenience helpers. The exact directive names, signatures, and examples are documented in the README and source. It is best treated as a set of view helpers rather than a full templating subsystem.
Do I need to register a service provider manually for this package?
In most Laravel applications you should not need to register the provider manually because package auto-discovery handles it. If your application disables auto-discovery, add the package provider to config/app.php in the providers array. Check the README for any config or asset publishing steps that may still be required.
Can I add my own custom Blade directives alongside this package?
Yes. Laravel's Blade::directive API lets you register your own directives in a service provider, and they can coexist with the directives supplied by this package. Prefix or namespace your custom directive names to avoid collisions. The package is intended to be easy to extend, so you can keep application-specific helpers local while using the package for common tasks.
Does appstract/laravel-blade-directives work with Laravel 10 and PHP 8.1?
Version 1.14.0 updates the Composer constraint to allow Laravel 10, which requires PHP 8.1 or newer. Confirm your runtime meets that PHP floor before installing or upgrading. Also check that any Illuminate component versions pinned elsewhere in your application do not conflict with the package's resolved dependencies.
Is appstract/laravel-blade-directives safe to use in production?
The 1.14.0 change is declarative Composer metadata, so runtime behavior should be unchanged for existing consumers. The main uncertainty is whether Laravel 10 support was validated in CI or only permitted by a relaxed constraint. Adopt it in a branch, run your full test suite, and use composer why-not to surface dependency conflicts before merging.
How do I test views that use these Blade directives?
Use Laravel's view testing helpers such as $this->view() or $this->blade() to assert rendered output. Because Blade directives compile to PHP, an undefined directive or syntax error usually appears at render time, so include at least one rendering test for each directive you rely on. Run those tests after every package upgrade to catch compilation or compatibility regressions.
Will upgrading to the latest version break my existing Laravel application?
The release note contains no migration, deprecation, or breaking-change language, which suggests a routine compatibility bump rather than a behavioral change. Still, widening or narrowing a framework constraint can alter dependency resolution, so update only this package rather than running a blanket composer update. Review the composer.json diff and validate through your existing test suite.
Are there alternatives to appstract/laravel-blade-directives, or should I write my own directives?
Writing a few Blade::directive calls yourself is straightforward if you only need one or two helpers. A maintained collection like this package saves boilerplate and centralizes common view logic when you need a broader set of directives. Before adopting it, compare the directive list against your actual needs, pin a tested version, and track its Laravel major support.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console