class User extends Authenticatable
{
use HasFactory, Notifiable, UUids;
protected $fillable = [
'first_name',
'last_name',
'email',
'password',
'phone',
'email_verified_at',
];
protected $hidden = [
'password',
];
protected $casts = [
'email_verified_at' => 'datetime',
'last_activity' => 'datetime',
];
public function blacklist()
{
return $this->hasOne('App\Models\BlackList');
}
}
class BlackList extends Model
{
use HasFactory, UUids;
protected $table = 'black_lists';
protected $fillable = [
'user_id',
];
}
Selamlar. Yapmak istediğim BlackList 'te bulunmayan kullanıcılar listelemek. Döngü kullanmadan bunu nasıl yapabilirim. Yapmak istediğime uygun bir sorgu yöntemi varmıdır acaba?