skip to Main Content

I’ve got a little problem, I can not run Laravel on my Mac OS X (the version of my Laravel is 5.4 PHP 7.3 and the error appears below.

(3/3) ErrorException
compact(): Undefined variable: operator (View: /Users/marques/Sites/barramento/resources/views/layouts/template.blade.php) (View: /Users/marques/Sites/barramento/resources/views/layouts/template.blade.php)

enter image description here

2

Answers


  1. You won’t be able to use that version of Laravel with PHP 7.3.

    You have 3 options:

    1. Upgrade Laravel (best option by far)
    2. Downgrade PHP (not so good, security)
    3. Tell composer to use an "untagged" version of laravel/framework for 5.4 where this has been fixed, but never released as a tagged version (since that version of Laravel is out of support)

    Laravel Github – Issues – [5.4] Fix Query Builder breakage with PHP 7.3

    Login or Signup to reply.
  2. Undefined variable and the variable in "resources/views/layouts/template.blade.php",
    maybe you get something from database and the database is empty or error in connection.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search