In Laravel it is very simple to handle exception and return custom error codes to view. Below is a example how you can return custom http header code.
<?php namespace App\Http\Controllers; use Request; class TestController extends Controller { public function test_function(Request $request) { return response("content", 430)->header('Content-Type', "text/html"); } } ?>
No comments:
Post a Comment