PHP code example of johntout / laravel-forge-panel

1. Go to this page and download the library: Download johntout/laravel-forge-panel 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/ */

    

johntout / laravel-forge-panel example snippets


use App\Models\User;
use Illuminate\Support\Facades\Gate;

Gate::define('viewLaravelForgePanel', function (User $user) {
    return $user->is_developer;
});

return [
    'middleware' => [
        'web',
    ],
    'route' => 'forge-panel',
    'token' => env('LARAVEL_FORGE_TOKEN'),
    'server_id' => env('LARAVEL_FORGE_SERVER_ID'),
    'site_id' => env('LARAVEL_FORGE_SITE_ID'),
];


php artisan laravel-forge-panel:install