spatie / laravel-tags

Add tags and taggable behaviour to your Laravel app

Home Page:https://freek.dev/609-an-opinionated-tagging-package-for-laravel-apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syntax error, unexpected 'array'

dcblogdev opened this issue · comments

I've just installed this package and added the trait to my model, then when the model. is loaded I'm getting:

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)

Which related to:

 protected array $queuedTags = [];

https://flareapp.io/share/87nOKoG5#F56

I'm running PHP 7.4.10

Have I missed a step on installation?

Have the same problem
Laravel 8.0
PHP 7.4.11
spatie/laravel-tags 3.0
https://prnt.sc/v8g85y

In my case, my terminal was 7.4 but my valet was using 7.3. I then told valet to use 7.4 specifically:

valet use php@7.4