PHP code example of marekmiklusek / laraboost

1. Go to this page and download the library: Download marekmiklusek/laraboost 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/ */

    

marekmiklusek / laraboost example snippets




declare(strict_types=1);

namespace App\Actions;

use Illuminate\Support\Facades\DB;

final readonly class CreateTodoAction
{
    /**
     * Execute the action.
     */
    public function execute(): void
    {
        DB::transaction(function (): void {
            //
        });
    }
}

// Database commands
DB::prohibitDestructiveCommands(app()->isProduction());

// Date handling
Date::use(CarbonImmutable::class);

// Model configurations
Model::automaticallyEagerLoadRelationships();
Model::unguard();
Model::shouldBeStrict();

// URL handling
URL::forceHttps(app()->isProduction());

// Vite configuration
Vite::useAggressivePrefetching();
bash
php artisan install:dev-tools
bash
php artisan make:action CreateTodoAction