File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Davzie/LaravelBootstrap/Core Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public function requireById($id)
85
85
return $ model ;
86
86
}
87
87
88
- public function getNew ($ attributes = array ())
88
+ public function getNew ( $ attributes = array () )
89
89
{
90
90
return $ this ->model ->newInstance ($ attributes );
91
91
}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ abstract class ObjectBaseController extends BaseController {
71
71
* inputs from Input::all() not from $model->fill();
72
72
* @var boolean
73
73
*/
74
- protected $ validateWithInput = true ;
74
+ protected $ validateWithInput = false ;
75
75
76
76
public function __construct ()
77
77
{
@@ -149,8 +149,7 @@ public function getDelete( $id ){
149
149
*/
150
150
public function postNew ()
151
151
{
152
- $ record = $ this ->model ->getNew ();
153
- $ record ->fill ( Input::all () );
152
+ $ record = $ this ->model ->getNew ( Input::all () );
154
153
155
154
$ valid = $ this ->validateWithInput === true ? $ record ->isValid ( Input::all () ) : $ record ->isValid ();
156
155
You can’t perform that action at this time.
0 commit comments