This error message is telling you that you are using the constant index
as if it were a string, but PHP is assuming that you meant the string 'index'
. This is because you did not wrap the constant in quotes, which is required in PHP.
To fix this error, you need to wrap the constant in quotes, like this:
{{ url(‘index’) }}This will tell PHP that you meant to use the string 'index'
instead of a constant with the name index
.