From 8fd8e747d9bda5c49ff5569fc5c1e7faa3d5b038 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Jul 2016 22:35:21 -0700 Subject: [PATCH] Fix for missing input variable in suppliers ajax method --- app/Http/Controllers/SuppliersController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/SuppliersController.php b/app/Http/Controllers/SuppliersController.php index b1d189a2e8..1bf705f3dd 100755 --- a/app/Http/Controllers/SuppliersController.php +++ b/app/Http/Controllers/SuppliersController.php @@ -11,6 +11,7 @@ use App\Models\Setting; use Str; use View; use Auth; +use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\JsonResponse; @@ -102,10 +103,10 @@ class SuppliersController extends Controller } - public function store() + public function store(Request $request) { - $supplier=new Supplier; - $supplier->name=$new['name']; + $supplier = new Supplier; + $supplier->name = e($request->input('name')); $supplier->user_id = Auth::user()->id; if ($supplier->save()) {