New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

stonehilt/blade

StoneHilt's blade directives and other view helpers
5,571
Install
composer require stonehilt/blade
Latest Version:12.0.1
PHP:^8.4
Laravel:12
Older releases:10
License:proprietary
Last Updated:Jul 5, 2025
Links: GitHub  ·  Packagist
Maintainer: avastech

StoneHilt Blade

Adds blade directives that have not been integrated into the framework.

Overtime these directives may be deprecated and integrated into the core Laravel framework.

Installation

Include this library:

~ composer require stonehilt/blade

The StoneHiltBladeServiceProvider will automatically be loaded and the new directives will be available.

This overrides the creation of the Factory object with a custom version.

If the project has extended the Factory object, please change the extension to use StoneHilt\Blade\View\Factory.

Directives

form

Generate an HTML form element. The CSRF token is automatically included when the method if "POST". Automatically mocks "PUT", "PATCH" and "DELETE" requests via a hidden "_method" input.

Signature: @form(array $options)

  • $options is an associative array of attributes. Special Attributes:
    • method Form method attribute (required if route not set)
    • action Form action attribute (required if route not set)
    • route Use a named route to determine Form method and action attributes All other values are mapped directly to the HTML attribute.

Example:

@form(['method' => 'POST', 'action' => '/page/2', 'class' => 'class name'])
<!-- form contents -->
@endform

Signature: @form(string $method, string $action)

  • $method Form method
  • $action Form action

Example:

@form('POST', '/page/2')
<!-- form contents -->
@endform

inherit

Inherit properties from the parent component into a child's component view. This is useful when the child component needs to know the id or other key attributes of the parent component.

Signature: @inherit(array $mapping)

  • $mapping is an associative array of parent component field to local alias

Example:

@inherit(['id' => 'parentId'])
{{ $parentId }}

route

Return the route path based upon the name.

Signature: @route(string $name, array $parameters = [])

  • $name Route name
  • $parameters Parameters for the route (if applicable)

Example:

@route('post.update', ['page' => 2])

Related Packages

philo/laravel-blade

Use the simple and yet powerful Laravel Blade templating engine as a standalone...

691,729 355
wapmorgan/morphos-blade

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian plu...

91,317 33
alexdover/blade-set

A very simple blade extension which allows variables to be set.

58,008 23
railroad/bladesora

A blade template package for musora.

57,117 1
styde/blade-pagination

Laravel's pagination with Blade templating support

14,530 70

Version History

Version Released PHP Laravel License
12.0.1 ^8.4 ~12 proprietary
12.0.0 ^8.4 ~12 proprietary
10.0.1 ^8.2 ~10 proprietary
10.0.0 ^8.2 ~10 proprietary