我更新了我的索引方法,以包括软删除的模型: public function index() $quotations = Quotation::withTrashed(Model not Found错误: public function show(Quotation $quotation) $quotation = Quotation::withTrashed
在我的控制器中,我返回一个json对象,其中包含: public function show(Comic $comic) // } 有没有更短的形式来获得相同的输出?我在想 public function show(Comic $comic) // } 但这不起作用,并抛出错误: TypeError:
我有3个模型,子论坛,主题和帖子。有没有可能Eagerload全部3个? class Subforum extends Model public function topics() return $this->hasMany('App\Topic')->orderBy('sticky', 'desc')->latest("updated_at");}
{
public function subf