#Getting all results from db query
10 messages · Page 1 of 1 (latest)
glad i could help
->where('column', 'something')
->find() uses the primary key, if you need different fields you can use ->where()
Just as an FYI, you really should avoid doing this, as this might result in you fetching thousands of records at once which will eventually cause memory issues. Also, why use the DB facade and not Eloquent models?\
why not using a model? so you can specify the primary key protected $primaryKey = 'userId';