Git Product home page Git Product logo

laravel-theme's Introduction

Description

License Downloads

This is a Laravel package that adds basic support for managing themes. It allows you to build your views & your assets in seperate folders, and supports for theme extending! Awesome :)

Features:

  • Views & Asset separation in theme folders
  • Theme inheritance: Extend any theme and create Theme hierarchies (WordPress style!)
  • Integrates Orchestra/Asset to provide Asset dependencies managment
  • Your App & Views remain theme-agnostic. Include new themes with (almost) no modifications
  • Themes are distributable! Create a single-file theme Package and install it on any Laravel application.
  • Ships with console commands to manage themes

Documentation

Check the Documentation

If you are upgrading from v1.x please read the migration guide

Compability

v2.x requires Laravel 5.4+

Tests

This package is fully tested. Check the testing repository

laravel-theme's People

Contributors

ahmadsyamim avatar anurak-kg avatar benswinburne avatar chocolatkey avatar danielhookins avatar drbyte avatar fishisawesome avatar hailwood avatar igaster avatar khadkasimon avatar likemusic avatar mayrn-techdivision avatar mohrwurm avatar stefanbauer avatar thedigitalorchard avatar timramseyjr avatar tomswinkels avatar unrulynatives 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-theme's Issues

Using configSet on themes_path does not appear to change where views are searched for

I wanted to swap to use a different base directory when running tests so that I could keep views that I use for testing separate from production templates.

        $testPath = realpath(base_path('resources/views/test_theme'));

        Theme::configSet('themes_path', $testPath);

        var_dump(Theme::config('themes_path'));

        var_dump($testPath);

The output shows that the config value is changing but it's looking in the default location set up in settings.

The code looks for files in ...../resources/views/themes/300

Support overriding vendor packages views

I really like your theme package its simple and not overly complex compared to the others I have looked at.

I have a requirement to be able to override view files that are provided by custom packages.

I can publish the views to /resources/views/vendor but I can't seem to override the views from inside my theme.

I hacked at the themeViewFinder.php file and override the findNamedPathView() function and the below is the result that provides me this feature for me.

It would be great if support for this was added to your package.

<?php namespace igaster\laravelTheme;

use Illuminate\View\FileViewFinder;
use Illuminate\Support\Arr;

class themeViewFinder extends FileViewFinder {

    /**
     * Add support for vendor namded path overrides.
     *
     * @param  string  $name
     * @return string
     */
    protected function findNamedPathView($name)
    {
        list($namespace, $view) = $this->getNamespaceSegments($name);

        $vendorPath = $this->paths[0] . '/vendor/' . $namespace;
        $hints = $this->hints[$namespace];

        if (!Arr::has($hints, $vendorPath)) {
            $this->hints[$namespace] = Arr::prepend($hints, $vendorPath);
        }

        return $this->findInPaths($view, $this->hints[$namespace]);
    }

    public function setPaths($paths){
        $this->paths = $paths;
    }

    public function test(){
        dd($this->paths);
    }

}

View not found

Using laravel 5.2, and laravel-theme dev-master or 1.1, I've tried to View::make('test') (no layout inheritance)

resources/themes/mytheme/test.blade.php
resources/themes/mytheme/views/test.blade.php
views/themes/mytheme/test.blade.php
views/themes/mytheme/views/test.blade.php

But I get view file is not found, with view:clear everytime

config.php is

'active' => 'pixeladmin',

// tried:
'themes_path' => null, // or
'themes_path' => realpath(base_path('resources/themes')), // or
'themes_path' => realpath(base_path('resources/views')),

'themes' => [
    'pixeladmin', // or
        'pixeladmin' = [
              'views-path' => '' // or
              'views-path' => 'resources/themes/pixeladmin/',
        ],
]

What am I doing wrong please :( ?

Feature request

Hi,

consider this case:
I have a so-so interface in my app (root theme), I am slowly experimenting with a new layout (different CSS framework, etc) in a newly defined theme.

I would like to give my user a choice to peek into the new theme FOR A SINGLE VIEW
would that be possible to ask Laravel 5.2 to load files from new theme WITHOUT permanently switching to the new theme?

Sth. like
if($user_preview_new_theme != '1') { Theme::set_for_this_request('theme-name'); } return View::make('routines.index', compact('title','object')) ->with('itemkind', 'routines') ->with('task', 'view');

Single folder for theme and assets

Exist the way to combine theme and assets files in a single folder in "Public" dir?

I think this:

'my-theme' => [ 'views-path' => '/public/themes', 'asset-path' => Theme::url('assets'), ],

(No tested)

Is a correct way?

What is the license?

Hello,

Can we use this package for commercial cms project please ?

Best regards
V. Hutter

Considering, but some concerns

I'm considering using your package, but I have some concerns. When adopting a third-party package, it's very important (to me) that the package is maintained over time.

While the design of this package looks very promising, there's been some red flags that have me thinking twice... for example, you've used back-slashes in your example (img\path\file.png) instead of forward-slashes. Maybe that's just silly of me, but it raises concern about quality and attention to detail within the code itself. I would need to trust the package if I were to use it in my business.

Thanks for your awesome work so far. Your package is the closest that I've found to solving my current theme-management problem. There doesn't appear to be many solutions (two?) available for Laravel.

Wrong URL if theme is not in public root

Hi guys, I think there is a bug on URL generated by Theme::url() method.

I'm using a "themes" folder in the public root:

- public
   - ...
   - themes
      - theme1
         - assets
            - css
               - style.css
            - js
         - home.blade.php
         - page.blade.php
      - theme2

and I have set "themes_path" parameter like this:

'themes_path' => realpath(base_path('public/themes'))

README specify:

The path is relative to Theme Folder (NOT to public!)

So I have used this code Theme::url('assets/css/style.css') but I notice that the generated URL is wrong.

Wrong URL: /theme1/assets/css/style.css
Right URL: /themes/theme1/assets/css/style.css

what about multi-language case ?

what i want to say is there is no way to manage language assets of each theme .
for example like this

       resources /
                        lang/
                                t1/
                                   en/
                                   fr/   
                                 t2/
                                   en/
                                   fr/
                        view/
                                t1/
                                t2/

error views not working when placed in the theme

Here is my code:
$post = Post::where('slug', $slug)->firstOrFail();
If I look for non existing post and have my error views placed inside theme/errors
404.blade.php
403.blade.php
503.blade.php

they are not found by laravel when looking for non existing model.

If I however place the errors folder on same level as the theme folder then laravel finds them and renders them instead of standar laravel "NotFoundHttpException in Handler.php line 131:" message it shows if there are no error views

Is it possible to use them inside the themes folder?

Theme inherits defaults theme's path

2017-05-16 18_38_19

For some reason, after upgrading to 5.4 and updating this package to 1.14, this happens. It adds the default theme to the start if another theme is selected. Why?

<?php

return [

	'enabled' => true,

	'themes_path' => null,

	'asset_not_found' => 'LOG_ERROR',

	'active' => 'frontend',

	'themes' => [

		'bootstrapextended',

		'frontend',

		'neon-admin',

		'neon-user',

	],

];

Theme vs. Themes

I'm trying to use this Laravel-Theme package and I'm a bit confused. There seems to be some confusion about whether the word "theme" or "themes" should be used.

  1. In the README, it makes reference to a "theme.php" config file, but the file that actually gets installed is "themes.php" (plural), and this name makes more sense.
  2. Also, to set a theme, the docs say to use Theme::set('theme-name'), but when I look at the Theme class, it does not have a set() method. However, when I look at the Themes.php file (different from Theme.php), the set() method does exist.

It appears to be setting a theme when I call Theme::set('my-theme-name'), but then does not correctly use the views-path that I have configured. It's possible that it's not loading it from the environment-specific themes.php config file. Still investigating that.

question about compability with modules package

Hi

What will happen if I use package that gives me modules, for example: https://github.com/caffeinated/modules/

this package gives modules it's own resource, that is stored in the module folder:

'Resources/Views'   => 'resources/views',

What will happen when I try to use a view in the module resource folder, will laravel-theme package look in the wrong folder or will it load the view from modules folder?

Second question, since I would like modules to use the current theme layout how would I do that? Right now in my theme for any view I do this

@extends('layouts.admin')

How would I do something like that with resource in the module folder, so that it finds the layout.blade.php of the current theme?

These question are important since I am building a CMS and would like to use modules package to enable development by others of "extensions" I do not want to use packages as way of making extensions since I want enduser who is not advanced to be able to install the extensions with a click and also since I plan to support shared hosting composer and packages are out of question.

Hope to get an answer, possibly from @igaster

Package is not working on Laravel 5.3

Dear,

When I tried to use this package on Laravel 5.3, the command php artisan optimize fails with the error:
Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\View\FileViewFinder::setPaths()
On Laravel 5.2 it works fine.

By the way, greate package! Very usefull!.

Regards,
Diogo

assetPath and viewsPath for themes that not set asset-path and views-path in theme.json

I think its better to inherit assetPath and viewsPath from theme config in themes.php when there is no asset-path and views-path params in theme.json. In consturction of Theme class you just use

        $this->assetPath = $assetPath === null ? $themeName : $assetPath;
        $this->viewsPath = $viewsPath === null ? $themeName : $viewsPath;

and if change to

        $this->assetPath = $assetPath === null ? config('themes.asset_path') . $themeName : $assetPath;
        $this->viewsPath = $viewsPath === null ? config('themes.themes_path') . $themeName : $viewsPath;

when we use url() function, it'll find the file in our theme folder, not from the public folder, and there is no need to set the asets path and views path in theme.json file

Make themes location configurable

I personally don't like themes to be in the resources/views/myTheme, I prefer them to be in there own separate dedicated location resources/themes/myTheme. It's just a personal preference.

Unfortunately the path to the themes is hard coded to be resources/views and I can overcome this by configuring my themes views-path = '../themes/themeName/views', but this just seems messy.

I think it would be great if it was configurable and people could then place there themes wherever they wanted, even in the public folder if they so desire, not that I would recommend this.

The following small patch adds a variable to the config allowing for defining where themes are located and defaults to the current behavior.

diff U3B src/config.php src/config.php
--- src/config.php  Thu Dec 17 12:14:48 2015
+++ src/config.php  Mon Feb 01 10:42:05 2016
@@ -10,6 +10,15 @@

    'enabled' => true,

+    /*
+    |--------------------------------------------------------------------------
+    | File path where themes will be located.
+    | Can be outside default views path EG: resources/themes
+    |--------------------------------------------------------------------------
+    */
+
+    'path' => base_path('resources/views'), // defaults to: resources/views/theme-name
+
    /*
    |--------------------------------------------------------------------------
    | Set behavior if an asset is not found in a Theme hierarcy.
diff U3B src/Themes.php src/Themes.php
--- src/Themes.php  Thu Dec 17 12:14:48 2015
+++ src/Themes.php  Mon Feb 01 10:41:41 2016
@@ -10,9 +10,12 @@

     private  $defaultViewsPath;

+    private $themesPath;
+
     public function __construct(){
        $this->defaultViewsPath = Config::get('view.paths');
-       
+        $this->themesPath = Config::get('themes.path');
+
        $this->root = new Theme('root','','');
     }

@@ -68,17 +71,17 @@
    public function set($themeName){
        if (!Config::get('themes.enabled', true))
            return;
-       
+
        if (!$theme = $this->find($themeName))
            $theme = $this->add(new Theme($themeName));

        $this->activeTheme = $theme;

-       // Build Paths array. 
+       // Build Paths array.
        // All paths are relative first entry in 'paths' array (set in views.php config file)
        $paths = [];
        do {
-           $path = $this->defaultViewsPath[0];
+           $path = $this->themesPath;
            $path .= empty($theme->viewsPath) ? '' : '/'.$theme->viewsPath;
            if(!in_array($path, $paths))
                $paths[] = $path;

I have tested normal views overriding and fall-back to the default applications views folder.

I hope that makes sense and I hope you find this useful and are willing to incorporate it into your package.

Thanks for a great package.

consistency when not all partial views of a child are present

scenario

Consider this case:

  • I have two themes:
    root_theme with 'extends' => null,
    and
    experimental_theme with 'extends' => 'root_theme',

  • in both the experimental_theme and the root_theme I have a navbar this view: navs._toolbar
    two blade files are views/navs/_toolbar.blade.php and views/theme_experimental/navs/_toolbar.blade.php

  • The navbars are referenced in various view files. For instance, content of my form to create a new event looks like this:

    // file views/theme_experimental/events/create.blade.php
    @extends(layouts.master_experimental) @section('content') @include('navs._toolbar') @stop
    and

    // file views/events/show.blade.php
    @extends(layouts.master_root) @section('content') @include('navs._toolbar') @stop

Problem:

  1. not all views in my experimental theme exists. For instance, I have a view for creating an Event, but I don't have a show template.
  2. The CSS frameworks in my two themes are different
  3. When I switch to experimental theme and want to display the above create form, everything is fine!
  4. When I switch to show, then - since I have no view file in the theme, your package picks blade file from the root folder views/events/show.blade.php, but.... **it takes the included sub-templates from the child theme views/theme_experimental/events/show.blade.php.

The result is a mashup which destroys views. Current file-choosing policy in your package allows this.
My solution is away from usual structure of an app as I use your theme system to offer users a choice of radically different UI - so that they are able to pick the one they prefer: based on Twitter Bootstrap, Semantic UI, etc.

my feature suggestion

consistent inheriting of sub-files
Would that be possible to modify your package so that in case a parent template file is inherited from a parent theme, all the included sub-files are ALSO inherited from the same theme as the parent file?

Thx

Runtime change theme extends value

Is it possible to change theme extends value at runtime?

I tried this way:
Config::set('themes.themes.mobile.extends', 'new_theme_to_extend');

but nothing happens..

Here a piece of my code where I need this..

if (Agent::isMobile()) {
    if (Portal::hasCustomMobileTheme) {
        Theme::set('mobile_' . Portal::getCustomTheme);
    } else {
        Config::set('themes.themes.mobile.extends', Portal::getCustomTheme);
        Theme::set('mobile');
    }
} else {
    Theme::set('default');
}

Default extends mobile theme value is default.

Hope if someone can help..
Thanks in advance

Updating from 1.16 to 2.0.3

E:\Users\???\Bitbucket\???> composer require "igaster/laravel-theme"
Using version ^2.0 for igaster/laravel-theme
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing igaster/laravel-theme (v1.16)
  - Installing igaster/laravel-theme (v2.0.3)
    Loading from cache

Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize


  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'igaster\laravelTheme\themeServiceProvider' not found


PHP Fatal error:  Class 'igaster\laravelTheme\themeServiceProvider' not found in E:\Users\???\Bitbucket\???\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 208
Script php artisan optimize handling the post-update-cmd event returned with error code 255

Installation failed, reverting ./composer.json to its original content.

Any suggestions?

5.4 overwrites from vendor not working

after the upgrade to Laravel 5.4 the vendor overwrite in the theme directory stopped working.
for base view it still works but anything that is loaded from vendor directory it doesnt.

only loading default view page

i make theme1 in view folder and put my blade file on there . but it only loading from view/index.blade.php not loading from view/theme1/index.blade.php

asset is working nice like js css img

External Asset URL S3/CDN Support

Have it return the the assetPath if it's an external URL to support s3 or cdn as the base path. This may not be the best solution, but it works for me :)

    // gaster/laravel-theme/src/Theme.php

    public function url($url){
        if(preg_match('/^((http(s?):)?\/\/)/i',$url))
            return $url;

        if(preg_match('/^((http(s?):)?\/\/)/i',$this->assetPath))
            return $this->assetPath.'/'.ltrim($url, '/');

        $fullUrl = (empty($this->assetPath) ? '' : '/').$this->assetPath.'/'.ltrim($url, '/');
    }

Feature Request theme:clone

I think a good feature using the commands console would be to clone and rename a theme w/ assets so one could create a new theme from an already completed theme. I have seen and used this type of feature on several forum software apps such as Invision Power Board which I have created many mods for.
its good for making subtle changes to an existing theme and representing it as a new/additional theme.

I am working on it and will post my code when I get there. Im thinking using the PHP copy() function and then further it with the PHP rename() function. Seems simple enough but am dissecting your current console commands to work it into the theme app specific. I like the ease of theme::create / theme:package / theme:install and clone seems to be the next logical step.

Is it worth the trouble? Anyone think this will be useful? Either way I need the functionality for my own app but does anyone else think they could use this?

Blade '@extend' viewsPath inheritence

I wanted to use blade @extend for my templating, however I needed a way to get the template based on the selected theme. This works for me, if it finds the file under the themes /resources/views/ folder, it will use it, if not, it will fall back to the default theme. I am still new to this, so this may not be the best way to do this, but is this a feature you can add/improve?

Config:

/config/themes.php

       'default' => [
            'extends'       => null,
            'views-path'    => 'themes/default',
        ],

        'theme1' => [
            'extends'       => 'default',
            'views-path'    => 'themes/theme1',
        ],

Usage:
/resources/views/themes/{themename}/layouts/master.blade.php

<html>
<head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
    @yield('content')
</div>
</body>
</html>
/resources/views/themes/{themename}/templates/homepage.blade.php

@extends(Theme::viewsPath('layouts/master'))

@section('content')
   This is the body content of homepage.
@endsection

Code Modifications:
/vendor/igaster/laravel-theme/src/Themes.php

public function viewsPath($url){
     if (Config::get('themes.enabled', true))
        return $this->activeTheme->viewsPath($url);
     else
        return $url;
}
/vendor/igaster/laravel-theme/src/Theme.php

public function viewsPath($url){
        $fullUrl = (empty($this->viewsPath) ? '' : '/').$this->viewsPath.'/'.ltrim($url, '/');

        if (file_exists($fullPath = base_path('/resources/views/'.$fullUrl).'.blade.php'))
            return $fullUrl;

        if ($this->getParent())
            return $this->getParent()->viewsPath($url);

        //view not found
        $action = \Config::get('themes.view_not_found','LOG_ERROR');

        if ($action == 'THROW_EXCEPTION')
            throw new themeException("view not found [$url]");
        elseif($action == 'LOG_ERROR')
            \Log::warning("view not found [$url] in Theme [".\Theme::get()."]");
    }

extending/including default view?

Is there a way to @extend or @include the corresponding view from the default theme (or from the standard resources/view folder) in a theme?

For example, if I have a fairly complex view in the default theme, and I want to override some parts, perhaps a single @section in a theme, what's the best way to do that without duplicating the code from the default theme?

Laravel 5.2 compatibility

Hi,
I just tried to upgrade to Laravel 5.2 and I got compatibility issue:

igaster/laravel-theme v1.0.14 requires illuminate/support 5.0.*|5.1.*

my composer.json contains "illuminate/support": "5.*",, so I am out of ideas.
Thx

'asset-path' does not appear to work properly

First of all, nice work! I notice that I have no problems using views like so: resources/views/default for my 'default' theme. Unfortunately your code doesn't seem to know how to handle the public (assets) folder. As soon as I place all assets in public/default all my css and js fail to load. My config:

'default' => [
'extends' => null,
'views-path' => 'default',
'asset-path' => 'default',
],

I am using Laravel 5.1. Seems like a bug. But tell me if there is anything else I need to do to get this to work, thanks. It you think there may be a bug I can look into fixing it.

Theme::css, js, img and url does not output

Using Windows to develop. First of all; why does it compile as text and not as HTML? And why does it not get the URL correctly?

Log file:

[2015-10-22 20:04:14] local.WARNING: Asset not found [bootstrap.css] in Theme [neon]  

File structure:
22-10-2015 20_05_29

Code:
22-10-2015 19_35_46

Output:
22-10-2015 19_35_32

Code 2:
22-10-2015 19_53_41

Output 2:
22-10-2015 19_53_47

Config file:

<?php

return [

    'enabled' => true,

    'asset_not_found' => 'LOG_ERROR',

    'active' => 'neon',

    'themes' => [

        'bootstrapextended',

        'neon',

    ],

];

Mail view namespace not found in theme

Laravel replaces the mail namespace and seems to have its own concept of themes for mail for markdown emails. From config/mail.php

'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
],

Laravel's MailServiceProvider publishes to views/vendor/mail.

When using say mail::message to use views/$theme/vendor/mail/markdown/message.blade.php I can only use the ones in views/vendor/mail/markdown/; the package seems unable to find ones for the theme.

Theme::url() assumes webroot is /public/

Laravel is distributed with a default webroot folder called /public/ within its file structure, but that is not compatible with all web servers. Some servers will have a webroot in a different location, such as /public_html/ on cPanel servers.

Theme::url() makes an assumption that Laravel's /public/ folder is the webroot, and therefore fails to find assets when the webroot is located somewhere else. One workaround could be to compose the path using $_SERVER['DOCUMENT_ROOT'] as the base.

can't get it to work with laravel 5.3

I just found this package and I am using laravel 5.3

I installed the package, published the config file which I did not modify, modified app.php according to instructions. Created theme named default inside resources/views and put index.blade.php inside theme folder.

In my controller I did this:

    Theme::set('default');
    $categories = Category::with('children')->parents()->orderBy('created_at', 'asc')->paginate(100);
    return view('index', compact('categories'));

when I hit that specific route in the browser I get the error

InvalidArgumentException in FileViewFinder.php line 137: View [index] not found. but the index is right there in the default folder. What could I be doing wrong?

Debugging

The library seems to hide URLS of assets if not found in the hierarchy. This prevents the developer from debugging the code. Any workaround on this?

Package is not working on PHP 7.0

$ Type error: Argument 1 passed to igaster\laravelTheme\Tree\Item::addParent() must be an instance of igaster\laravelTheme\Tree\Item, boolean given, called in /home/autocity/website2016/releases/20160719005736/vendor/igaster/laravel-theme/src/Themes.php on line 32

how to auto load view

I use laravel 5.2 and igaster/laravel-theme package.

when i want return view use below code

  public function index()
    {

        return view('themes/' . Theme::get() . '/views.index');
    }

and load automatically default theme
But I prefer use this code

return view('index');

structure folder:
resources
--------views
-----------------------theme1
-----------------------theme2

Impossible to replace/override \igaster\laravelTheme\Themes class

In themeServiceProvider::register method 'igaster.themes' is bind as shared and instantly is used:
$Themes = $this->app->make('igaster.themes');. As a result, it's impossible to substitute Themes class. I suggest themeServiceProvider::register to do only registration job. All the themes crawling should be done later - before rendering with $this->app['events']->listen('composing:*', $detectThemesCallback); (this event will be called before any method from your Themes instance)

Problem installing on Laravel 5.4.23

Hi,

I followed the steps on the installation page. However, on the last step it errors and I don't know what to do. Please help. I have attached some pictures of the progress here:

Composer - Installation:

screen shot 2017-06-27 at 1 12 24 pm

Add into configuration arrays - App.php

screen shot 2017-06-27 at 1 16 06 pm

screen shot 2017-06-27 at 1 16 12 pm

Here is the error:

screen shot 2017-06-27 at 1 11 21 pm

When the line on the provider array is removed, config rebuilds cache correctly.

I also run into the same problem when trying to publish.

screen shot 2017-06-27 at 1 19 08 pm

Please help!

Namespace change

Hey @igaster,

What's your thoughts on updating the namespace to Igaster\LaravelTheme (case changes).
It's really odd having leading lowercase namespaces.

Thought I'd float the idea before I send through a pull request as it is technically a breaking change for something minor (I'm just kinda OCD ;)) so would require a major version bump.

The other option of course if we really wanted to avoid the major version bump but do want the updated namespace is to introduce a compatibility namespace - so everything in igaster\laravelTheme has mirror classes to Igaster\LaravelTheme but they are simply empty classes that extend the others e.g.

<?php

namespace igaster\laravelTheme;

class Theme extends Igaster\LaravelTheme\Theme {}

which we would remove when we needed to bump the major version for any reason.

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.