/laravel-html-encrypt

Laravel Html Encrypt

Primary LanguagePHPMIT LicenseMIT

Laravel Html Encrypt

Latest Stable Version Total Downloads

Installation

You can install the package via composer:

 composer require php-junior/laravel-html-encrypt

Once installed, in your project's config/app.php file replace the following entry from the providers array:

PhpJunior\LaravelHtmlEncrypt\LaravelHtmlEncryptServiceProvider::class,

And

php artisan vendor:publish --provider="PhpJunior\LaravelHtmlEncrypt\LaravelHtmlEncryptServiceProvider"

This is the contents of the published config file:

return [
    'disable_right_click'       => true,
    'disable_ctrl_and_F12_key'  => true,
];

Next you must add the \PhpJunior\LaravelHtmlEncrypt\Middleware\HtmlEncrypt middleware to the kernel.

// app/Http/Kernel.php

...
protected $middleware = [
    ...
    \PhpJunior\LaravelHtmlEncrypt\Middleware\HtmlEncrypt::class,
];

License

The MIT License (MIT). Please see License File for more information.