PHP code example of amrachraf6699 / laravel-idempotency-ledger

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

    

amrachraf6699 / laravel-idempotency-ledger example snippets


Route::post('/payments', StorePaymentController::class)
    ->middleware(['auth:sanctum', 'idempotent']);

Schedule::command('idempotency:prune')->daily();
bash
composer vendor:publish --tag=idempotency-config
php artisan vendor:publish --tag=idempotency-migrations
php artisan migrate