1. Go to this page and download the library: Download emir/laravel-webartisan 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/ */
emir / laravel-webartisan example snippets
return [
// Master switch
'enabled' => env('WEBARTISAN_ENABLED', true),
// Only available in these environments
'enabled_environments' => ['local'],
// URL prefix (accessible at /webartisan)
'route_prefix' => env('WEBARTISAN_PREFIX', 'webartisan'),
// Restrict to a specific domain
'domain' => env('WEBARTISAN_DOMAIN', null),
// Route middleware
'middleware' => ['web'],
// Gate-based authorization (see Security section)
'gate' => null,
// Only allow these commands (empty = all except blocked)
'allowed_commands' => [],
// Always block these commands
'blocked_commands' => [
'down', 'up', 'env', 'serve', 'tinker',
'key:generate', 'migrate:fresh', 'migrate:reset',
'db:wipe', 'db:seed', ...
],
// Terminal theme: 'dark', 'light', 'monokai', 'dracula'
'theme' => env('WEBARTISAN_THEME', 'dark'),
];
'enabled_environments' => ['local'],
use Illuminate\Support\Facades\Gate;
Gate::define('viewWebartisan', function ($user) {
return in_array($user->email, [
'[email protected]',
]);
});