Manipulating Laravel html response just before sending it to browser
问题 What is the proper way to manipulate final output before sending it to browser? (laravel 5.*) I have created facade namespace App\Facades; use Illuminate\Support\Facades\Response as ResponseFacade; use Illuminate\Http\Response as ResponseHttp; class Response extends ResponseFacade { public static function viewMod($view, $data = [], $status = 200, array $headers = []) { $output = \Response::view($view, $data, $status, $headers); return some_manipulating_function($output); } } and in the