PHPackages                             sukohi/hilt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. sukohi/hilt

ActiveLibrary[Templating &amp; Views](/categories/templating)

sukohi/hilt
===========

A Laravel package to add @error directive of Blade.

1.0.1(9y ago)047MITPHP

Since Oct 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/SUKOHI/Hilt)[ Packagist](https://packagist.org/packages/sukohi/hilt)[ RSS](/packages/sukohi-hilt/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Hilt
====

[](#hilt)

A Laravel package to add @error directive of Blade.

Installation
============

[](#installation)

Execute the following composer command.

```
composer require sukohi/hilt:1.*

```

Set the ServiceProvider in `config/app.php`

```
'providers' => [
    ...Others...,
    Sukohi\Hilt\HiltServiceProvider::class,
]

```

Preparation
===========

[](#preparation)

To publish the view, execute the following commands.

```
php artisan vendor:publish

```

- You can change the view located at `resources/views/vendor/hilt/error.blade.php`.

Then set Blade directive of Hilt in `app/Providers/AppServiceProvider.php` like so.

```
public function boot()
{
    \Sukohi\Hilt\Hilt::directive();
}

```

Now you can use `@error()` in your views.

Usage
=====

[](#usage)

(in View)

```
@error('INPUT-KEY')
