Laravel - find by custom column or fail

后端 未结 2 1982
梦如初夏
梦如初夏 2021-02-01 12:01

There\'s findOrFail() method which throws 404 if nothing was found, e.g.:

User::findOrFail(1);
2条回答
提交回复
热议问题