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.0npm install --global yarn
composer --version
Composer version 2.6.5yarn
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
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
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();
}
}