my model
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)');
}
my UserContorller
public function postUser(PostUser $request){
User::userEddit($request);
return redirect('shop');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire