1. Go to this page and download the library: Download a2zwebltd/laravel-dev-mode 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/ */
a2zwebltd / laravel-dev-mode example snippets
use A2ZWeb\DevMode\DevModeService;
$devMode = app(DevModeService::class);
// Enable for user and IP
$devMode->enable($user, '192.168.1.1');
// Check status
if ($devMode->isEnabled($user, request()->ip())) {
// All abilities granted via Gate::before
}
// Disable
$devMode->disable($user);
use A2ZWeb\DevMode\DevModeService;
$devMode = app(DevModeService::class);
if ($devMode->isEnabled(auth()->user(), request()->ip())) {
// Show or enable developer-only tools
\Debugbar::enable();
} else {
\Debugbar::disable();
}