Create WP Users with Corcel, Laravel

96 views Asked by At

im developing a administration panel for a Wordpress Site but managed by Laravel (for security reasons), im using Corcel and i didn't find more information about how to add Users/Posts.

All the 'getting' methods to access the info in the database are working good. exists a pre made method than let me create Users? or i need to do a query manually like "INSERT"??

1

There are 1 answers

0
Alonso Fuentes Castillo On

[self-response]

this is what i was looking for:

    $user = new User;
    $user->name = request()->adminName;
    $user->email = request()->adminEmail;
    $user->password = encrypt(request()->adminPassword);
    $user->company_id = $company->id;
    $user->save();