mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Use L5 Request method for input
This commit is contained in:
parent
98eb26a2bd
commit
406d270c01
|
@ -10,6 +10,7 @@ use Redirect;
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use Lang;
|
use Lang;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This controller handles all actions related to Custom Asset Fields for
|
* This controller handles all actions related to Custom Asset Fields for
|
||||||
|
@ -63,10 +64,15 @@ class CustomFieldsController extends Controller
|
||||||
* @since [v1.8]
|
* @since [v1.8]
|
||||||
* @return Redirect
|
* @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);
|
$validator=Validator::make(Input::all(), $cfset->rules);
|
||||||
if ($validator->passes()) {
|
if ($validator->passes()) {
|
||||||
$cfset->save();
|
$cfset->save();
|
||||||
|
|
Loading…
Reference in a new issue