Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel-cors

composer require fruitcake/laravel-cors
Comment

what is cors in laravel

Cross-Origin Resource Sharing
sharing resources between different sources
Comment

Laravel SPA cors

// add a middleware  (php artisan make:middleware Cors)
// add in your kernel (AppHttpMiddlewareCors::class,)
public function handle(Request $request, Closure $next)
{
  return $next($request)->header('Access-Control-Allow-Origin', '*')
  ->header('Access-Control-Allow-Methods','GET, POST, PUT, PATCH, DELETE, OPTIONS')
  ->header('Access-Control-Allow-Headers','Origin, X-Requested-With, Content-Type, Accept, Authorization');
}
Comment

PREVIOUS NEXT
Code Example
Php :: call satic blco in magento 2 
Php :: laravel migrate error default character 199 boot 
Php :: woocommerce function traduccion label 
Php :: in php how to check md5 password 
Php :: laravel collection makeHidden 
Php :: PHP sha1 — Calculate the sha1 hash of a string 
Php :: laravel collection contains 
Php :: php sentense case 
Php :: Call to undefined method PsyUtilStr::random() 
Php :: laravel custom validation 
Php :: audio validation in jquery validation 
Php :: filament make resource 
Php :: Trying to access variable outside laravel collection 
Php :: wpmu create user 
Php :: guzzlehttp submit form file 
Php :: log magento 1 
Php :: laravel storage get filename 
Php :: php user ip from post request 
Php :: html windows logo 
Php :: magento 2 remove order 
Php :: run new oroject laravel with idff port 
Php :: arry to string php 
Php :: php preplace 
Php :: Token capabilities in vault 
Php :: remove php 
Php :: how to fetch associate data from csv in php 
Php :: check if the logged in user is admin 
Php :: foreach loop in php stack overflow 
Php :: find total value from cart in laravel 
Php :: php find all subclasses of class 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =