vperyod/method-handler

PSR7 method override middleware

0.1.0 2016-06-20 16:37 UTC

This package is auto-updated.

Last update: 2024-10-29 04:53:00 UTC


README

Method override handler

Latest version Build Status Coverage Status Quality Score

Installation

composer require vperyod/method-handler

Usage

// 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" />