PHP code example of therealmkadmi / laravel-citadel
1. Go to this page and download the library: Download therealmkadmi/laravel-citadel 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/ */
therealmkadmi / laravel-citadel example snippets
Route::middleware(['citadel-passive'])->group(function () {
// These routes will be monitored but never blocked
Route::get('/public-content', 'ContentController@index');
});
Route::middleware(['citadel-active'])->group(function () {
// These routes get full protection with external API calls
Route::post('/login', 'AuthController@login');
Route::post('/register', 'AuthController@register');
});
Route::middleware(['citadel-protect'])->group(function () {
// These routes get complete protection with all analyzers
Route::post('/checkout', 'PaymentController@processPayment');
});