I also created a model for Roleuser:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class Roleuser extends Model
{
use Notifiable;
protected $fillable = [
'user_id', 'role_id'
];
}
Remove the return
statement before User::create
You are returning before getting to Roleuser::create
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community