hexadog / laravel-themes-manager Goto Github PK
View Code? Open in Web Editor NEWBring multi themes support to your Laravel application with a full-featured Themes Manager
Home Page: https://laravel-themes-manager.netlify.app
License: MIT License
Bring multi themes support to your Laravel application with a full-featured Themes Manager
Home Page: https://laravel-themes-manager.netlify.app
License: MIT License
How can I use without vendor name?
PHP 7.3.9 (cli) (built: Feb 17 2020 12:46:14) ( NTS )
Laravel Framework 8.83.0
I have hexadog/laravel-themes-manager included in my Laravel composer project. While parsing the package on composer install/update with version 1.10.4 or later I get the following error:
`
ParseError
syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
at vendor/hexadog/laravel-themes-manager/src/Console/Commands/ListThemes.php:28
24▕
25▕ /**
26▕ * List of existing themes.
27▕ /
➜ 28▕ protected array $themes = [];
29▕
30▕ /*
31▕ * Prompt for module's alias name.
32▕ */
+1 vendor frames
2 [internal]:0
Composer\Autoload\ClassLoader::loadClass("Hexadog\ThemesManager\Console\Commands\ListThemes")
3 [internal]:0
spl_autoload_call("Hexadog\ThemesManager\Console\Commands\ListThemes")
`
If I force the version back to 1.10.3, everything works fine on composer update.
Laravel seems to override mail
hint with default views.
so themes/my-theme/resources/views/vendor/mail
is not taken into account and mail views have to be override into resources/views/vendor/mail
directory
composer require hexadog/laravel-themes-manager
Using version ^1.7 for hexadog/laravel-themes-manager
./composer.json has been updated
Running composer update hexadog/laravel-themes-manager
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- hexadog/laravel-themes-manager[v1.7.0, ..., v1.7.1] require hexadog/larave
l-theme-installer ^1.0 -> satisfiable by hexadog/laravel-theme-installer[v1.0, .
.., v1.0.5].
- hexadog/laravel-theme-installer[v1.0, ..., v1.0.4] require composer-plugin
-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constrai
nt.
- hexadog/laravel-theme-installer v1.0.5 requires php ^7.3 -> your php versi
on (8.0.1) does not satisfy that requirement.
- Root composer.json requires hexadog/laravel-themes-manager ^1.7 -> satisfi
able by hexadog/laravel-themes-manager[v1.7.0, v1.7.1].
You are using Composer 2, which some of your plugins seem to be incompatible wit
h. Make sure you update your plugins or report a plugin-issue to ask them to sup
port Composer 2.
Installation failed, reverting ./composer.json and ./composer.lock to their orig
inal content.
Hello I want to add settings to themes. How can I get values from theme composer.json file?
Why I get this error?
I'm using ISPCONFIG3 and apache2, I tried these steps:
php artisan storage:link
chown -R web4:client0 /var/www/clients/client0/web4/web/*
chown -R web4:client0 /var/www/clients/client0/web4/web/storage
sudo chmod -R 775 /var/www/clients/client0/web4/web/storage
But still getting that annoying symlink(): Permission denied error when this package trying to set the theme, I using your package in this way (getting the active theme value from database settings table active_theme key):
It's working on my local server but I want to deploy it on a remote server.
class HomeController extends Controller
{
public function __construct()
{
$activeTheme = GeneralSettings::where('key', 'active_theme')->value('value');
ThemesManager::set($activeTheme);
}
}
symlink(): No such file or directory
deploy at digitalocean app platform and use with gecche/laravel-multidomain
how to config it?
I am creating a CMS theme and have chosen the vendor name that contains the "theme" keyword: "inu-themes". When I open the page, the vendor's name is truncated to "inus", not ""inu-themes", and a symlink is created with this name too. If I change vendor name to "inu-s", then package works fine.
Hi,
When i create theme symlink without vendor name.
For example:
themes/vendorName/themeName
public/themes/themeName --> wrong! According to the documentation it should be: /public/themes/vendorName/themeName
any help?
I Just installed on Laravel 10, why I can run command "theme:activate". I got error message :
`
php artisan theme:activate malsehat/default
ERROR Command "theme:activate" is not defined. Did you mean one of these?
⇂ theme:cache:clear
⇂ theme:list
⇂ theme:make
`
How can i solved this issue?
Hi, I added 404.blade.php to my theme but it's not working. File path is themes\vendor\default\resources\views\errors\404.blade.php. Is there any way to fix it?
Laravel: 10.48.4
laravel-themes-manager: 1.12.0
Thank you.
New error from today; I'm using Laravel 9
This is related to v1.10.4
The previous version was working well.
Hi all,
we are using Laravel 10.6.2 and Plugin 1.10.10 but have some troubles to get the error views working on child themes.
If we setup our theme as a child theme and an error page occurs (404, 500), the error view from the parent theme will be loaded and not from the child theme. The blade error files are present on both themes.
If we define the same theme not as a child theme everything works perfect and the correct blade file is loaded. We tested this in our own application and in a fresh Laravel installation with the same results.
I have uploaded a small test git where you can see the problem. I was expected to see the "503 Test" text, instead i got the "503 Core" text
When displaying a page containing a livewire component, it normally appears. but, when the state changed like do validation, return errors with message view ['livewire-file'] not found like shown in the image:
If I create an empty file with the same name in the default resources/views folder, the error is gone but validation not working or you can say the magic view update of livewire not working anymore.
Hi,
I have parent
theme and i created a new child theme named parent-wearing
. I am using parent-wearing
theme but when i run view('contact.blade.php')
it returns parent/resource/views/contact.blade.php
file. Why?
My structer is like this:
This is my parent composer.json:
{
...
"authors": [
{
"name": "Özgür Özarpacı",
"email": "###"
}
],
"extra": {
"theme": {
"parent": "",
"active": true
}
}
}
This is my parent-wearing composer.json:
{
...
"authors": [
{
"name": "Özgür Özarpacı",
"email": "###"
}
],
"extra": {
"theme": {
"parent": "default/parent",
"active": true
}
}
}
It is not working when THEMES_DIR location inside resources dir.
THEMES_DIR=
{!! Theme::asset('css/app.css') !!}
the output works as expected:
https://domain.tld/themes/vendor-name/theme-name/css/app.css
But when it set to
THEMES_DIR=resources/views/themes
{!! Theme::asset('css/app.css') !!}
the output is only the relative path:
css/app.css
Hey all,
i am not able to create a child Theme. Multiple Themes works great. But if try to create a child Theme, i get the following errors:
I'm using make:theme command. Plugin Verison 1.8 Laravel 8.12
at C:\Users\dev\Desktop\Hofladen Neues System\vendor\hexadog\laravel-themes-manager\src\ThemesManager.php:324
320▕ if (is_null($name)) {
321▕ return null;
322▕ }
323▕
➜ 324▕ return $this->themes->first(function ($theme) use ($name, $vendor) {
325▕ // normalize module name
326▕ $name = str_replace(['-theme', 'theme-'], '', $name);
327▕ // Check if $name contains vendor
328▕ if (($pos = strpos($name, '/')) !== false) {
1 C:\Users\dev\Desktop\Hofladen Neues System\vendor\hexadog\laravel-themes-manager\src\ThemesManager.php:106
Hexadog\ThemesManager\ThemesManager::findByName("hls/default")
2 C:\Users\dev\Desktop\Hofladen Neues System\vendor\hexadog\laravel-themes-manager\src\ThemesManager.php:356
Hexadog\ThemesManager\ThemesManager::has("hls/default")
Hi folks,
I need to run the theme make command like this in laravel
Artisan::call('theme:make', ['name' => 'soul']);
but giving this error
The command "theme:make" does not exist.
any solution for this
Actually I need to create child theme dynamically
Please help
I think that in the ThemeEnabled, ThemeEnabling events, etc., it would be better to pass an object theme instead of just the name of the Theme.
When trying to set a child theme it returns the following issue:
Call to protected method Hexadog\ThemesManager\ThemesManager::findByName() from scope Illuminate\Support\Facades\Facade
I'm listing themes in the terminal but it returns missing getVersion and the same with the getDescription:
Call to undefined method Hexadog\ThemesManager\Theme::getVersion()
at vendor/hexadog/laravel-themes-manager/src/Console/Commands/ListThemes.php:41
37▕ foreach ($themes as $theme) {
38▕ $this->themes[] = [
39▕ 'name' => $theme->getName(),
40▕ 'vendor' => $theme->getVendor(),
➜ 41▕ 'version' => $theme->getVersion(),
42▕ 'description' => $theme->getDescription(),
43▕ 'extends' => $theme->getParent() ? $theme->getParent() : '',
44▕ 'default' => $theme->getName() === config('themes-manager.fallback_theme') ? 'X' : '',
45▕ ];
Try to add both to the Theme class of the package to check if that's the problem but returns the first message mentioned above:
Call to protected method Hexadog\ThemesManager\ThemesManager::findByName() from scope Illuminate\Support\Facades\Facade
Can you please update this package for Laravel 11? I wanted to try this one but could not install it.
Hello, I'd like to know if it's possible to implement the package with Vite. If so, is it possible to have a little more information? Thanks a lot!
And the view exists, and it's working 99% of the time.
But I get that error in my log always.
I even log the loaded theme, "theme pixany/commerce", so it loads the theme, but on some occasions, it doesn't work.
Any help?
how multilanguage works ? any step or guidance ?
Content of the profile drop-downs should be in alphabetical order.
Current state
Is ordered in numbers
Sometimes I also need to create components to simplify my code. I also tried creating a comment, but it didn't work. So how to create a custom component?
Great package, would gladly collaborate when I have the time
Maybe the docs are not clear, I think this image should be at the first, so everyone will know how is the folder structure needed to make it work
I still couldn't make it work:
The doc says we can use ´´´ThemesManager::set('my-theme') ´´´ to set a theme, but the folder structure is showing that a theme should be wrapped in a vendorname folder (something like any php package, like laravel/jetstram).
I tried everything, nothing happen:
ThemesManager::set('azure')
ThemesManager::set('azure/soft')
ThemesManager::set('soft')
ThemesManager::set('azure.soft')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.