我的模特:
static public function userEddit($request){
$user = new self();
$user->name = $request['name'];
$user->email = $request['email'];
$user->password = bcrypt($request['password']);
$user->save();
DB::insert('INSERT INTO users_role VALUES(' . $user->id .',5)');
}
我的UserContorller
public function postUser(PostUser $request){
User::userEddit($request);
return redirect('shop');
}