avviso-si/laravel-trial-mode

Easy Trial Mode for Laravel 5

1.0 2018-06-20 18:50 UTC

This package is not auto-updated.

Last update: 2024-05-17 23:55:59 UTC


README

Latest Stable Version Total Downloads License

For Laravel 5.2+

Instalation

composer require avviso-si/laravel-trial-mode="1.0"

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

\AvvisoSI\TrialMode\Providers\TrialModeServiceProvider

Add the Middleware in middleware array in app/Http/Kernel.php

protected $middleware = [
    ...
    \AvvisoSI\TrialMode\Http\Middleware\CheckForTrialMode::class,
];

Add trial at your storage/framework/.gitignore

Usage

Start trial mode with 14 days

php artisan trial:set 14

End trial mode

php artisan trial:remove

Customize View

To customize, you just need create a 402.blade.php at app/resources/views/errors/