Register
User registration is simplified on Simcify, check out the magic below;
This page also depends table
value from /config/auth.php .
Parameters
Parameter
Required
Type
Description
$data
Yes
array
an array with data to save on the database, the array key should match the database column name.
$options
No
array
Description on the table below
$options explanation
Key
Type
Description
authenticate
boolean
if true, user will be logged in after successful signup.
redirect
string
url to redirect user after successful signup
uniqueEmail
string
email to check if it exists on the database
Usage
use Simcify\Auth;
Auth::signup(
array(
"name" => "Jane Doe",
"email" => "jane@example.com",
"phone" => "123456"
),
array(
"authenticate" => true,
"redirect" => "https://example.com",
"uniqueEmail" => "jane@example.com"
)
)
Response
Response is expected if redirect is not set. Response could be error or success.
array(
"status" => "success",
"title" => "Sign up Successful",
"message" => "Your account was created successfully"
)
Last updated