Tutorial by Examples

Sometimes we need cross domain request for our API's in laravel. We need to add appropriate headers to complete the cross domain request successfully. So we need to make sure that whatever headers we are adding should be accurate otherwise our API's become vulnerable. In order to add headers we nee...
<?php namespace laravel\Http\Middleware; class CorsHeaders { /** * This must be executed _before_ the controller action since _after_ middleware isn't executed when exceptions are thrown and caught by global handlers. * * @param $request * @param \Closure $next * @pa...

Page 1 of 1