🔥 Laravel tip: the sole method
Feb 15, 2022
You can use the sole method to make sure you have one record matching a query.
If the record is not found, it will throw `ModelNotFoundException`.
But, if more than one record is found, it will throw `MultipleRecordsFoundException`
If the record is not found, it will throw `ModelNotFoundException`.
But, if more than one record is found, it will throw `MultipleRecordsFoundException`
Other tips:
🔥 Laravel Tip: Concurrent Requests
Apr 22, 2022