Code Monkey home page Code Monkey logo

laravel-themes-manager's People

Contributors

cbekir avatar christophchi avatar gaetan-hexadog avatar josegus avatar minhkhoa-fpt avatar minhkhoablieu avatar mohamedsabil83 avatar xalunda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

laravel-themes-manager's Issues

ParseError unexpected 'array' in ListThemes.php:28 in v1.10.4+

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.

Mail views not overriden

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/maildirectory

Installation Error

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.

symlink(): Permission denied

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 problem

symlink(): No such file or directory

deploy at digitalocean app platform and use with gecche/laravel-multidomain

how to config it?

Bag with vendor name, which exists "theme"

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.

Wrong Symlink for public folder.

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

Command theme:activate is not defined

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?

Error pages are not working

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.

Error View on Child Template not loading

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

https://github.com/alibaba258/laravel-themes-error-test

Error when state changed using livewire

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:

Screenshot from 2022-03-05 02-26-58

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.

Hexadog/laravel-theme-manager installation error

Hello everyone, everything good?
I'm running the package installation but it's showing an error when installing the hexadog/laravel-theme-installer package.

Data:

  • "laravel/framework": "^9.19"
  • "php": "^8.0.2",

Could you help me?

Thanks
Samuel Vincenzo

image

Is child theme broken?

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:

  • parent
    • resources
      • views
        • contact.blade.php
  • parent-wearing
    • resources
      • views
        • contact.blade.php

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
        }
    }
}

Theme::asset() behaves differently when THEME_DIR is set to resources/views/themes

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

Can´t create a Child Theme

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")

php artisan theme:make command using php is giving error

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

About event.

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.

v1.10.5 return issue when setting a child 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

Update for Laravel 11

Can you please update this package for Laravel 11? I wanted to try this one but could not install it.

Can't create same theme name in another vendor

I'm building an ecommerce and have to create themes for the store, for example

vendor: azure
themes: oceanic | dark

vendor: google
themes: purple | dark

image

Would be possible to allow repeated theme names but different vendor folder?

How to create custom components?

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?

Doc is not clear

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

image

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')

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.