There is Laravel project of Metronic but I want to know, Is there a plugin or a better way to add it in existing Laravel project. I can add all dependence one by one and move Model, Controllers and view in my project, but its a lengthy and error prone way. So I want to know if there is a better way or any documents which I can follow to add Metronic in my project.
Hi Mamta,
Please add the code from this file
app/Providers/AppServiceProvider.php
$theme = theme();
// Share theme adapter class
View::share("theme", $theme);
Hi Mamta,
At the moment, there is no other way than to move the files manually. At least, you have to move these folders.
Hi, Thank you for your reply. What about content from vendor folder? Do I need to copy the plugins vendor folder or I need to install these using composer ?
the vendor is a generated folder. You can run "composer install" to setup.
Okay, thank you
Hi, I moved the files as suggested, but now I get
In menu.php line 92:
Call to undefined function theme()
while running composer. Any suggestion to solve this?
Hi Mamta,
The helpers.php file needs to include in the package.json.
"autoload": {
"files": [
"app/helpers.php"
],
My bad, I forget to check the composer.json file.
Thank you for your reply, now it start working.
Hi, Now when I visit /register URL, I get local.ERROR: Undefined variable $theme at resources/views/auth/layout.blade.php(13)
I also see RegisteredUserController create function, but there is no $theme object?
Do I need to run any command after copy these files to my existing application. I run composer install
, it gives Nothing to install, update or remove
.