PHP code example of php-nl / laravel-payload-editor
1. Go to this page and download the library: Download php-nl/laravel-payload-editor 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/ */
php-nl / laravel-payload-editor example snippets
use Illuminate\Support\Facades\Gate;
/**
* Register any authentication / authorization services.
*/
public function boot(): void
{
Gate::define('viewLaravelPayloadEditor', function ($user) {
return in_array($user->email, [
'[email protected]',
]);
});
}
bash
composer bash
php artisan vendor:publish --tag="laravel-payload-editor-config"