1. Go to this page and download the library: Download statikbe/laravel-dev-lock library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
statikbe / laravel-dev-lock example snippets
use Illuminate\Foundation\Configuration\Middleware;
use Statikbe\DevLock\Http\Middleware\DevLockMiddleware;
->withMiddleware(function (Middleware $middleware): void {
$middleware->appendToGroup('web', DevLockMiddleware::class);
})
// app/Http/Kernel.php
protected $middlewareGroups = [
'web' => [
// ... the rest of the group
\Statikbe\DevLock\Http\Middleware\DevLockMiddleware::class,
],
];
// config/dev-lock.php
'dev_skip_patterns' => [
'up',
'api/*',
'webhooks/*', // ported from your own lock
],