📜  laravel 技巧 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:26.037000             🧑  作者: Mango

代码示例6
//$user = User::find($id);
//if (!$user) { abort (404); }
//=> do this
$user = User::findOrFail($id);
//@sujay