PHP code example of harvv / laravel

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

    

harvv / laravel example snippets


// bootstrap/app.php  (Laravel 11+)
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \Harvv\Laravel\Http\Middleware\HarvvContext::class,
    ]);
})

// app/Http/Kernel.php  (Laravel 10 and earlier)
protected $middlewareGroups = [
    'web' => [
        // ...
        \Harvv\Laravel\Http\Middleware\HarvvContext::class,
    ],
];
blade
{{-- resources/views/layouts/app.blade.php --}}
<body>
    {{-- ... your layout ... --}}

    @harvv
</body>
bash
php artisan harvv:verify