PHP code example of vperyod / method-handler
1. Go to this page and download the library: Download vperyod/method-handler 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/ */
vperyod / method-handler example snippets
// Create handler with Auth and ResumeService instance
$handler = new Vperyod\MethodHandler\MethodHandler();
// Add to your middleware stack, radar, relay, etc.
$stack->middleware($handler);
// In your views generating forms, you can use the Helper to generate an
// appropriate hidden input.
$helper = new Vperyod\MethodHandler\MethodOverrideHelper;
echo $helper('PUT');
// <input type="hidden" name="__method_overide" value="PUT" />