I'd like to create a new user in programmatically way, calling a webhook from a form of another website.
I added the route in web.php;
I added in the Controller a function copying the create function in RegisterController.php of Auth
public function add_user(Request $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
I added the route under $except of class VerifyCsrfToken
(even if is not working and I commented, just for testing, the
// \App\Http\Middleware\VerifyCsrfToken::class,
in Kernel.php
but on online test tool I receive a "405 Method Not Allowed".
Any suggestion?