Giter Club home page Giter Club logo

plugins's People

Contributors

kaidesu 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

Watchers

 avatar  avatar

plugins's Issues

error when outputting plugin the main template

Hello!
Using modules:
caffeinated/modules
caffeinated/plugins

CatalogServiceProvider.php

<?php
namespace App\Modules\Catalog\Providers;

use App;
use Config;
use Lang;
use View;
use Plugin;
use Illuminate\Support\ServiceProvider;

class CatalogServiceProvider extends ServiceProvider
{
    public function register()
    {
        // This service provider is a convenient place to register your modules
        // services in the IoC container. If you wish, you may make additional
        // methods or service providers to keep the code more focused and granular.
        App::register('App\Modules\Catalog\Providers\RouteServiceProvider');
        App::register('App\Modules\Catalog\Providers\WidgetServiceProvider');

        Plugin::register('count_ads', 'App\Modules\Catalog\Plugins\CountAds');
        $this->registerNamespaces();
    }

    protected function registerNamespaces()
    {
        Lang::addNamespace('catalog', realpath(__DIR__.'/../Resources/Lang'));
        View::addNamespace('catalog', base_path('resources/views/vendor/catalog'));
        View::addNamespace('catalog', realpath(__DIR__.'/../Resources/Views'));
    }
}

CountAds.php

<?php
namespace App\Plugins;

class CountAds
{
    public function run()
    {
        return '1111';
    }
}

?>

main.blade.php

{{ count_ads() }}

I receive an error when outputting the main template:
FatalErrorException in Plugins.php line 66:
Call to undefined method Illuminate\View\Compilers\BladeCompiler::createMatcher()

plugin manager

I guess this could also be a widget manager.

I was wondering how you'd go about doing a manager to turn on / off plugins (widgets).
With the modules/themes you could do this with the json file but since these packages don't have that what would you suggest?

Thanks!

difference from / to widgets

How is this package different from your widgets package?

lol, l just love how you're one step ahead of what I'm doing! Thanks!

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.