我有一个具有以下指令的.htaccess:
<RequireAll>
Require all granted
Require not ip xx.xx.xxx.xx
</RequireAll>
在通过MAMP启动Apache时,我在apache日志中得到以下错误:
Invalid command '<RequireAll', perhaps misspelled or defined by a module not included in the server configuration
我的Apache是2.4.23,MAMP是4.1,但
我创建了一个计算文章视图的简单应用程序。在数据库项目表中有一个列view_count。此外,我还有一个已定义的事件&侦听器,它每次查看某篇文章时都会增加view_count:
问题是,如何更新view_count,并存储在数据库中..?!
App\Events\ ArticleViews.php:
class ArticleViewsextends Event
{
use SerializesModels;
public $article;
public function __construct(Article $article)
{