Fix for missing input variable in suppliers ajax method

This commit is contained in:
snipe 2016-07-13 22:35:21 -07:00
parent e6b872299d
commit 8fd8e747d9

View file

@ -11,6 +11,7 @@ use App\Models\Setting;
use Str; use Str;
use View; use View;
use Auth; use Auth;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\JsonResponse; 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 = new Supplier;
$supplier->name=$new['name']; $supplier->name = e($request->input('name'));
$supplier->user_id = Auth::user()->id; $supplier->user_id = Auth::user()->id;
if ($supplier->save()) { if ($supplier->save()) {