mercredi 5 octobre 2016

Proper Technique to Post to Laravel API

I have a problem posting with Ember to my Laravel API. I keep getting COR's errors and when I try adding the proper headers to my store method the errors are still there. I have researched this for one an hour and no results. Any help would be greatly appreciated. Here is the code for my store() method...

        $statusCode = 200;
        $libraries = $request->all();
        $library = Library::create($libraries);
        $criteria = $library->toArray();
         return Response::json([
             'library' => $criteria],
              $statusCode);




Aucun commentaire:

Enregistrer un commentaire