PHP code example of aculix99 / laravel-quick-static

1. Go to this page and download the library: Download aculix99/laravel-quick-static 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/ */

    

aculix99 / laravel-quick-static example snippets


define('QUICK_STATIC_ROOT', __DIR__);



use Illuminate\Foundation\Application;
use Illuminate\Http\Request;

define('QUICK_STATIC_ROOT', __DIR__);
ists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
    .'/../bootstrap/app.php';

$app->handleRequest(Request::capture());


...
Route::middleware(\Aculix99\LaravelQuickStatic\Middleware\StoreStatic::class)->group(function() {
    Route::get('/path', fn() => view('test'));
    Route::get('/json', fn() => response()->json('test'));
});
...
sh
php artisan vendor:publish --tag=quick-static
sh
php artisan quick-static:cache-config
json
"post-autoload-dump": [
    // "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
    // "@php artisan package:discover --ansi",
    "@php artisan vendor:publish --tag=quick-static",
    "@php artisan quick-static:cache-config"
],
sh
php artisan quick-static:clear