Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Multi-Demo (Metronic 8) for Laravel doesn't function for me :(


At <a>https://preview.keenthemes.com/metronic8/laravel/documentation/getting-started/multi-demo/build?demo=demo2</a>, the documentation mentions the following:

"To set a fixed demo by default. Edit this file app/Providers/AppServiceProvider.php and set the demo id in using the function below."

When I go to that project folder AppServiceProvider.php, I notice that the line of code $theme->setDemo('demo2'); cannot be put in because it does not recognize neither the $theme variable nor the setDemo method.

My question is, for what reason this variable does not exist and also it is not specified inside which function, even having executed all the procedure suggested by the Metronic documentation:

node -v v21.5.0
npm install --global yarn
composer --version Composer version 2.6.5
yarn
npm run dev
npm run dev --demo2

(The .env file and the database had already been configured)
PHP 8.2.12
Laravel Framework 10.37.3
Metronic 8.2.1

Thanks


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 (2)


AppServiceProvider.php code:

<?php

namespace App\Providers;

use App\Core\KTBootstrap;
use Illuminate\Database\Schema\Builder;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}

/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Update defaultStringLength
Builder::defaultStringLength(191);

KTBootstrap::init();
}
}



Hi Maria,

It appears that the link you provided is for Metronic Laravel version 7, which is considered legacy. The latest Laravel starter kit for Metronic version 8 currently does not include a multi-demo feature.

You may download legacy Metronic Laravel from here:
https://drive.google.com/file/d/1WAC-ad3o-fIdORpybddFOUXfNM2JG5Cx/view?usp=share_link

For the latest version docs:
https://preview.keenthemes.com/laravel/metronic/docs/index

Thanks


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  :(