所以我有一张表格
<fieldset>
<legend>Post a comment:</legend>
<form target="forum" method="post" action="forum.php">
//Targeting the iframe in my form (`<form target="forum"`) & Submitting the form to my PHP file (`action="forum.php
使用laravel的热切加载,我可以做一些事情,比如
$forums = Forum::with('posts', 'threads')->get();
获得帖子和论坛的线程,而不需要做太多的查询。
但是,我有一个方法可以获得论坛的最后一篇文章。
这是我在Forum.php中的方法
public function lastThread()
{
$forums = $this->arrayOfIDs(); // get array of all ids, even subforum's subforums.
return Thr