PHP code example of irfanokr / laravel-secure-bridge
1. Go to this page and download the library: Download irfanokr/laravel-secure-bridge 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/ */
irfanokr / laravel-secure-bridge example snippets
// Protected — requests to these must be signed:
Route::middleware('secure-bridge')->group(function () {
Route::post('/profile', [ProfileController::class, 'update']);
Route::get('/orders', [OrderController::class, 'list']);
});
// Not protected — works normally, no signing needed:
Route::get('/', [HomeController::class, 'index']);