public function store(Request $request) { $barang = new Barang(); // $validator = Validator::make($request->all(),User::$rules,User::$pesan); // if ($validator->fails()) // { // return redirect('user/create')->withErrors($validator)->withInput(); // } $barang->tambahBarang($request); }