onWriteConnection() is for querying on write connection. If you already have read/write connections...
As for sent messages, I would either define a one-to-many relation for sent messages and users, or p...
Closure doesn't have access to variables in the scope it was defined in. You have to pass $toUser an...
Model::find($id) method can return either a Model, a Collection of models (if you pass it an array...
The Laravel portal for problem solving, knowledge sharing and community building.