Error on running Laravel demo

Getting error when trying to run the demo
https://prnt.sc/4m14Mc2MqTF_

https://prnt.sc/W57MZncVFgB5

$ php artisan migrate:fresh --seed
PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in E:\Projects\LARAVEL_PROJECTS\metroni
c_laravel\vendor\nunomaduro\termwind\src\Functions.php on line 17

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (8)

Hi Prasit Mukul

Do you have PHP version 8.1 installed?

Thanks

tried using PHP version 8 and 7.4

Hi, After installing PHP 8.1 and updating all other things, I tried to set up the demo again and am now getting a new error.
Illuminate\Database\QueryException

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_template.settings' doesn't exist (SQL: select * from `settings`)

Tried from local XAMPP but still same error
Please see the screenshot.
https://prnt.sc/07y1rUr-1XQl

One more thing noticed that the documentation is referring to Laravel 8.x but the code provided its Laravel 9.x

Documentation:
https://preview.keenthemes.com/metronic8/laravel/documentation/getting-started/build?demo=demo1

In Code:
https://prnt.sc/0wwwxG0Z3YFw

The documentation link is correct. Metronic8 means it is for Metronic v8. The Laravel version is 9.

Thanks

Hello, since the helpers are autoloaded on boot, it's trying to search for a setting in settings table, but since the tables are not yet migrated it returns the error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_template.settings' doesn't exist (SQL: select * from `settings`)

A quick solution would be to comment out:

/app/helpers.php Line: 191

and

/app/Core/Bootstraps/BootstrapDemo1.php Line: 28-39

Then after migrating and seeding you can uncomment back those lines.

This need to be fixed.

Thank you for your efforts. We will fix it as soon as possible.

Thanks

is there any updates regarding this issue? i'm having similar issue

- nunomaduro/collision[v6.0.0, ..., v6.3.0] require php ^8.0.0 -> your php version (7.4.16) does not satisfy that requirement.
- Root composer.json requires nunomaduro/collision ^6.0 -> satisfiable by nunomaduro/collision[v6.0.0, ..., v6.3.0].

even though my phpinfo show running php8

this has caused the error
unexpected '|', expecting variable (T_VARIABLE)

hope some solution for the issue

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(