Answer the question
In order to leave comments, you need to log in
Why might an error occur?
The mistake itself
Type error: Too few arguments to function App\Http\Controllers\RegistrationController::store(), 1 passed and exactly 2 expected
public function store(Request $request, $id)
{
$token = str_random(32);
$users = [
'name' => request('name'),
'email' => request('email'),
'password' => request('password'),
'user_token' => ($token),
];
$device= Device::find($id);
dd($device);
$users = Sentinel::registerandActivate($users);
$users->devices()->attach( $device);
Answer the question
In order to leave comments, you need to log in
The 'store' method confuses me. Why does it accept $id ?
Show router
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question