Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Error on running Laravel demo


Getting error when trying to run the demo




$ 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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (8)

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


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:



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

Thanks



Hi Prasit Mukul

Do you have PHP version 8.1 installed?

Thanks



tried using PHP version 8 and 7.4


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(