Use L5 Request method for input

This commit is contained in:
snipe 2016-08-25 17:07:58 -07:00
parent 98eb26a2bd
commit 406d270c01

View file

@ -10,6 +10,7 @@ use Redirect;
use App\Models\AssetModel;
use Lang;
use Auth;
use Illuminate\Http\Request;
/**
* This controller handles all actions related to Custom Asset Fields for
@ -63,10 +64,15 @@ class CustomFieldsController extends Controller
* @since [v1.8]
* @return Redirect
*/
public function store()
public function store(Request $request)
{
//
$cfset=new CustomFieldset(["name" => Input::get("name"),"user_id" => Auth::user()->id]);
$cfset = new CustomFieldset(
[
"name" => e($request->get("name")),
"user_id" => Auth::user()->id]
);
$validator=Validator::make(Input::all(), $cfset->rules);
if ($validator->passes()) {
$cfset->save();