Git Product home page Git Product logo

modules's Introduction

Laravel 5 Modules

pingpong/modules is a laravel package which created to manage your large laravel app using modules. Module is like a laravel package, it have some views, controllers or models. This package is supported and tested in both Laravel 4 and Laravel 5.

Upgrade Guide

To 2.0.18

If you have been updated to version 2.0.18, please read this release note.

To 2.0.10

Previously, we add two service provider from this package. In version 2.0.5, we just need register one service provider. Now, we can remove Pingpong\Modules\Providers\BootstrapServiceProvider from providers array, because now it service provider is registered automatically by Pingpong\Modules\ModulesServiceProvider.

From Laravel 4 to Laravel 5

If upgrade your Laravel app from Laravel 4 to Laravel 5, there is a few things to do if you are using this package. You will receive some kind errors about config not loaded. To fix this issue, please follow this instruction.

  • If you publish the package's configuration file, you need to move the config file from app/config/packages/pingpong/modules/config.php to app/config/modules.php.
  • If you are not publish the package's configuration file and you want to publish the config file, just run php artisan vendor:publish command and you are done.

From 1.1.* to 1.2.0

New configuration file. This breaking change affected if you publish the configuration file from this package. To fix this issue, create new config file called config.php in your app/config/packages/pingpong/modules/ directory. Next move the array contents from paths.php file to paths array in new configuration file. Your config file will looks like this.

Installation

To install through composer, simply put the following in your composer.json file:

{
    "require": {
        "pingpong/modules": "~2.1"
    }
}

And then run composer install to fetch the package.

Quick Installation

You could also simplify the above code by using the following command:

composer require "pingpong/modules:~2.1"

Add Service Provider

Next add the following service provider in config/app.php.

'providers' => array(
  'Pingpong\Modules\ModulesServiceProvider',
),

Next, add the following aliases to aliases array in the same file.

'aliases' => array(
  'Module' => 'Pingpong\Modules\Facades\Module',
),

Next publish the package's configuration file by run :

php artisan vendor:publish

Autoloading

By default controllers, entities or repositories not loaded automatically. You can autoload all that stuff using psr-4. For example :

{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "modules/"
    }
  }
}

Configuration

  • modules - Used for save the generated modules.
  • assets - Used for save the modules's assets from each modules.
  • migration - Used for save the modules's migrations if you publish the modules's migrations.
  • generator - Used for generate modules folders.
  • scan - Used for allow to scan other folders.
  • enabled - If true, the package will scan other paths. By default the value is false
  • paths - The list of path which can scanned automatically by the package.
  • composer
    • vendor - Composer vendor name.
    • author.name - Composer author name.
    • author.email - Composer author email.
  • cache
    • enabled - If true, the scanned modules (all modules) will cached automatically. By default the value is false
    • key - The name of cache.
    • lifetime - Lifetime of cache.

Creating A Module

To create a new module you can simply run :

php artisan module:make <module-name>
  • <module-name> - Required. The name of module will be created.

Create a new module

php artisan module:make Blog

Create multiple modules

php artisan module:make Blog User Auth

By default if you create a new module, that will add some resources like controller, seed class or provider automatically. If you don't want these, you can add --plain flag, to generate a plain module.

php artisan module:make Blog --plain
#OR
php artisan module:make Blog -p

Naming Convension

Because we are autoloading the modules using psr-4, we strongly recommend using StudlyCase convension.

Folder Structure

laravel-app/
app/
bootstrap/
vendor/
modules/
  ├── Blog/
      ├── Assets/
      ├── Config/
      ├── Console/
      ├── Database/
          ├── Migrations/
          ├── Seeders/
      ├── Entities/
      ├── Http/
          ├── Controllers/
          ├── Middleware/
          ├── Requests/
          ├── routes.php
      ├── Providers/
          ├── BlogServiceProvider.php
      ├── Resources/
          ├── lang/
          ├── views/
      ├── Repositories/
      ├── Tests/
      ├── composer.json
      ├── module.json
      ├── start.php

Artisan Commands

Create new module.

php artisan module:make blog

Use the specified module. Please see #26.

php artisan module:use blog

Show all modules in command line.

php artisan module:list

Create new command for the specified module.

php artisan module:make-command CustomCommand blog

php artisan module:make-command CustomCommand --command=custom:command blog

php artisan module:make-command CustomCommand --namespace=Modules\Blog\Commands blog

Create new migration for the specified module.

php artisan module:make-migration create_users_table blog

php artisan module:make-migration create_users_table --fields="username:string, password:string" blog

php artisan module:make-migration add_email_to_users_table --fields="email:string:unique" blog

php artisan module:make-migration remove_email_from_users_table --fields="email:string:unique" blog

php artisan module:make-migration drop_users_table blog

Rollback, Reset and Refresh The Modules Migrations.

php artisan module:migrate-rollback

php artisan module:migrate-reset

php artisan module:migrate-refresh

Rollback, Reset and Refresh The Migrations for the specified module.

php artisan module:migrate-rollback blog

php artisan module:migrate-reset blog

php artisan module:migrate-refresh blog

Create new seed for the specified module.

php artisan module:make-seed users blog

Migrate from the specified module.

php artisan module:migrate blog

Migrate from all modules.

php artisan module:migrate

Seed from the specified module.

php artisan module:seed blog

Seed from all modules.

php artisan module:seed

Create new controller for the specified module.

php artisan module:make-controller SiteController blog

Publish assets from the specified module to public directory.

php artisan module:publish blog

Publish assets from all modules to public directory.

php artisan module:publish

Create new model for the specified module.

php artisan module:make-model User blog

php artisan module:make-model User blog --fillable="username,email,password"

Create new service provider for the specified module.

php artisan module:make-provider MyServiceProvider blog

Publish migration for the specified module or for all modules. This helpful when you want to rollback the migrations. You can also run php artisan migrate instead of php artisan module:migrate command for migrate the migrations.

For the specified module.

php artisan module:publish-migration blog

For all modules.

php artisan module:publish-migration

Enable the specified module.

php artisan module:enable blog

Disable the specified module.

php artisan module:disable blog

Generate new middleware class.

php artisan module:make-middleware Auth

Update dependencies for the specified module.

php artisan module:update ModuleName

Update dependencies for all modules.

php artisan module:update

Show the list of modules.

php artisan module:list

Facades

Get all modules.

Module::all();

Get all cached modules.

Module::getCached()

Get ordered modules. The modules will be ordered by the priority key in module.json file.

Module::getOrdered();

Get scanned modules.

Module::scan();

Find a specific module.

Module::find('name');
// OR
Module::get('name');

Find a module, if there is one, return the Module instance, otherwise throw Pingpong\Modules\Exeptions\ModuleNotFoundException.

Module::findOrFail('module-name');

Get scanned paths.

Module::getScanPaths();

Get all modules as a collection instance.

Module::toCollection();

Get modules by the status. 1 for active and 0 for inactive.

Module::getByStatus(1);

Check the specified module. If it exists, will return true, otherwise false.

Module::has('blog');

Get all enabled modules.

Module::enabled();

Get all disabled modules.

Module::disabled();

Get count of all modules.

Module::count();

Get module path.

Module::getPath();

Register the modules.

Module::register();

Boot all available modules.

Module::boot();

Get all enabled modules as collection instance.

Module::collections();

Get module path from the specified module.

Module::getModulePath('name');

Get assets path from the specified module.

Module::getAssetPath('name');

Get config value from this package.

Module::config('composer.vendor');

Get used storage path.

Module::getUsedStoragePath();

Get used module for cli session.

Module::getUsedNow();
// OR
Module::getUsed();

Set used module for cli session.

Module::setUsed('name');

Get modules's assets path.

Module::getAssetsPath();

Get asset url from specific module.

Module::asset('blog:img/logo.img');

Install the specified module by given module name.

Module::install('pingpong-modules/hello');

Update dependencies for the specified module.

Module::update('hello');

Module Entity

Get an entity from a specific module.

$module = Module::find('blog');

Get module name.

$module->getName();

Get module name in lowercase.

$module->getLowerName();

Get module name in studlycase.

$module->getStudlyName();

Get module path.

$module->getPath();

Get extra path.

$module->getExtraPath('Assets');

Disable the specified module.

$module->enable();

Enable the specified module.

$module->disable();

Delete the specified module.

$module->delete();

Custom Namespaces

When you create a new module it also registers new custom namespace for Lang, View and Config. For example, if you create a new module named blog, it will also register new namespace/hint blog for that module. Then, you can use that namespace for calling Lang, View or Config. Following are some examples of its usage:

Calling Lang:

Lang::get('blog::group.name');

Calling View:

View::make('blog::index')

View::make('blog::partials.sidebar')

Calling Config:

Config::get('blog.name')

Publishing Modules

Have you created a laravel modules? Yes, I've. Then, I want to publish my modules. Where do I publish it? That's the question. What's the answer ? The answer is Packagist. In pingpong/modules version >= 1.2.0, when you generate a module, you will see there is a new file generated called composer.json.

Auto Scan Vendor Directory

By default the vendor directory is not scanned automatically, you need to update the configuration file to allow that. Set scan.enabled value to true. For example :

// file config/modules.php

return [
  //...
  'scan' => [
    'enabled' => true
  ]
  //...
]

You can verify the module has been installed using module:list command:

php artisan module:list

Publishing Modules

After creating a module and you are sure your module module will be used by other developers. You can push your module to github or bitbucket and after that you can submit your module to the packagist website.

You can follow this step to publish your module.

  1. Create A Module.
  2. Push the module to github.
  3. Submit your module to the packagist website. Submit to packagist is very easy, just give your github repository, click submit and you done.

modules's People

Contributors

aaronflorey avatar ahmadina avatar bitdeli-chef avatar blackakula avatar f0ntana avatar gravitano avatar jastkast avatar joearcher avatar memeq1 avatar moston avatar noxify avatar nwidart avatar prhost avatar sonus avatar subodhdahal avatar syahzul avatar tlikai avatar xlink 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  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

modules's Issues

->prop() method

Hello,

I've updated to 1.1.7, and the ->prop() method seems to be gone.
Was it renamed to something else ?

Thank you,

FYI: I used to it to get the providers $app['modules']->prop("{$module}::providers") to register them.

Make trusty to work with the modules.

I have installed the modules and it works great so far but my problem is that I also want to use Trusty with it and it works only as long as model User.php is located inside app/models.
I need to have User.php inside one of the modules.
If inside my module controller I call the User model with: use Modules/Account/models/User I get "trait trusty not found"

Cannot Publish Config

I have a fresh install of the latest laravel 5 dev version. I have add the package to composer.json and take composer update

after adding the facade and the service provider i would publish the config file.

http://puu.sh/clSGa/47c6b32672.png

I hope you can help

Unresolvable dependency resolving ...

Hi,

I just updated to the latest version on dev-master. I'm having the following error:

Unresolvable dependency resolving [Parameter #0 [ <required> $name ]] in class Pingpong\Modules\Module

Any idea what's doing this?

Thanks

Edit: same when using "pingpong/modules": "~1.1",

Module configuration not accessible

Hey,

Did anything change since last update about accessing the module configuration?
Since the composer update I did this morning I cannot access Config::get('core::core.admin-prefix') anymore. Which previously worked.
My file structure hasn't changed since.

Thanks.

where is View command and why my view not working

hi, why i cannot create view from terminal? why the command is missing?

how to use return View::make('supplier::index');

when i echo in method index is fine, but if i called view i got error Class 'Modules\Supplier\Controllers\View' not found

i dont understand this code

/*
|--------------------------------------------------------------------------
| Register The Module Namespaces
|--------------------------------------------------------------------------
|
| Here is you can register the namespace for this module.
| You may to edit this namespace if you want.
|
*/

View::addNamespace('supplier', __DIR__ . '/../views/');

Lang::addNamespace('supplier', __DIR__ . '/../lang/');

Config::addNamespace('supplier', __DIR__ . '/../config/');

EDIT..
i use this and works. but why i cannot use only View::...... ?

return \View::make('supplier::index');

adding namespaces to controllers

can you add namespace to module controllers? because when we have two modules with same controller name, occure conflict in routes.

Got error while package updating

I got an error on recent package update

[RuntimeException] Error Output: PHP Warning: Uncaught exception 'ErrorException' with message 'require(/home/ab192130/Web/e01/modules/profile/start/global.php): failed to open stream : No such file or directory' in /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/Module.php:68 Stack trace: #0 /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/Module.php(68): Illuminate\Exception\Handler->handleError(2, 'require(/home/a...', '/home/ab19 2130/...', 68, Array) #1 /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/Module.php(68): Pingpong\Modules\Module::register() #2 /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/ModulesServiceProvider.php(44): Pingpong\Modules\Module->register() #3 /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/ModulesServiceProvider.php(23): Pingpong\Modules\ModulesServiceProvider->registerAutoloader() #4 /home/ab192130/Web/e01/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(550): Pingpong\Modules\ModulesServiceProvider->boot() in /home/ab192130/ Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/Module.php on line 68 PHP Fatal error: Pingpong\Modules\Module::register(): Failed opening required '/home/ab192130/Web/e01/modules/profile/start/global.php' (include_path='/home/ab19213 0/Web/e01/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear') in /home/ab192130/Web/e01/vendor/pingpong/modules/src/Pingpong/Modules/Module.php o n line 68

[L5] Cannot use module:setup

I have installed a fresh copy of laravel 5 and the latest modules package. After installation all fine, but i cannot use any console command.

i want try artisan module:setup this is the result

http://laravel.io/bin/9vD01

Does anyone have a solution for me?

Class 'Module' not found

I don't know why I get this error.. It worked before :(
Class 'Module' not found

My code is:
public function index() { return Module::asset('blog', 'img/welcome.jpg'); }

Removed 1.0.3 version and installed 1.0.0 it worked fine but in 1.0.3, 1.0.2 and 1.0.1 it just say that "Class 'Module' not found" :(

Migration problem when using custom modules path

For my project i wanted to place the modules inside the app folder.
I changed the paths config to:

return [
    'modules'   =>  base_path('app/modules'),
    'assets'    =>  public_path('modules'),
];

Everything worked fine except the migrations. I would get "nothing to migrate" message.
After looking in the code i found that in ModuleMigrateCommand this path function is used:

protected function getMigrationPath($name)
{
return basename($this->module->getPath()) . "/{$name}/database/migrations/";
}

This ofcourse returns:"modules/[Modulename]/database/migrations/"
And this command would be executed: "php artisan migrate --path="modules/[Modulename]/database/migrations/"" Which searches for migrations in a folder that does not exist.

I have currently fixed it with the following code until this issue is resolved.

protected function getMigrationPath($name)
{
$modulePathWithoutBasePath = str_replace(base_path(), "", $this->module->getPath());
return $modulePathWithoutBasePath . "/{$name}/database/migrations/";
}

new Update 1.1.9 wrong namespace after generate new model on class Model on the Module

After I update module to 1.1.9 when I generate new model of Module it has place on location

php artisan module:model Tabungan tabungan
Created : D:\jobs\free\workbase/Modules/Tabungan/Entities/Tabungan.php

It generate new model like this

<?php namespace Modules\Tabungan\Database\Models;
use Illuminate\Database\Eloquent\Model;

class Tabungan extends Model {

    protected $fillable = [];

}

So I need to manually correct to namespace like this

<?php namespace Modules\Tabungan\Entities;
use Illuminate\Database\Eloquent\Model;

class Tabungan extends Model {

    protected $fillable = [];

}

I watch it change on version 1.1.7 to 1.1.9 but not in 1.1.6

[Question] New Tag for latest version

Hi,

since you have added the option "priority", I would ask, when we can plan with the next
stable version of this? We need this, but currently we are on version 1.1.16 in the master branch.

Thanks!

Routes are loaded by default

Hello,

I started to let some people in the AsgardCMS beta, and there's still the issue that pingpong/modules loads the routes by default.
I have to tell them to comment line 193 on the Module class $this->registerRoutes(); since I use the L5 way of registering routes. Using a service provider.
Could you please not register routes by default using your technique?

Thanks,

Event firing issue

hello gravitano , i played with your package i like it very much but when i tried firing an event from my HomeController application and i tried listening for it from my test module Controller it does not work .

please add command module:resource

please add command module:resource

because i always repeat create module:controller, migration, model, and view everytime.. so if you can put command module:resource it would be awesome

Enable alias results in exception

If you enable the alias setting for a module it attempts to use "Controllers" rather than "controllers" which does not work on case sensitive filesystems.

Trigger events at various stages

An idea that would be nice to have, would be to trigger events at various stages like:

  • Before loading modules
  • After loading modules
  • ...

This would allow us to hook listen for those events and do something when modules are loaded. (I'm thinking of re-ordering the menu items for instance)

Namespacing not working

Hi,

Created a dummy project "blog" tested it and worked fine.
Now I removed the comment to included the namespace but it fails to find the controller.

ErrorException
Class 'Modules\blog\Controllers\BlogController' not found

^^ blog always shows here in lowercase even though when i created it from the command line I used a capital "Blog"

any ideas?

After update 1.1.7 routes are not found anymore

Hi,

I just upgraded to version 1.1.7 and now all the routes of all my packages could not be found anymore. laravel is throwing the following exception: Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException. Going back to version 1.1.6 solves my problem for now!

Directory structure for modules

Hi
In the pingpong module manager after create module directory structure Laravel 5 ?
This package is fully compatible with Laravel 4?

Proposal: Load modules by priority

Sometimes can be useful loading modules with a specific order instead of alphabetically.

This can be done using a "priority" key in module.json and refactoring some methods (all,

Priority must be an integer value and can be 0 by default.

Thougts?
I can send a PR for this.

Cheers

Migrate Rollback

How to rollback migration of module?

displayed error when I type "module:migrate:rollback":

[InvalidArgumentException]
Command "module:migrate:rollback" is not defined.

displayed error when I type just "migrate:rollback":

{"error":"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'CreateAssignedTicketsTable' not found","file":"\/home\/push\/icenter\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Migrations\/Migrator.php","line":297}}

Hidden directory has been as module

eg. when i call Module::allWithDetails(),i got an Exception.
Module [.svn] doest not have module.json file. This file is required for each module.

module:install for non github

Hi.

I just saw the command module:install but it is github only.
Have you planned to allow others like bitbucket or custom installation ?

Module inheritance

Hey,

Another feature idea: making it possible to 'extend' a module.
My modules are in base_path(Modules), and would like to be able to create an app/Modules/User module, which would extend the Modules/User module. If a view/class/config/translation isn't found in the child module, the parent is used.

What do you think?

Register ServiceProvider

How can I register a module's ServiceProvider?
I haven't seen any reference about this in documentation.

Cheers

Issue with autoloading

Hi,

Thanks for this great package.
I'm having an issue in regard with autoloading. I've generated a module 'Article', in base_path('Modules'). In my composer.json I have :

"psr4": {
        "Modules\\Article\\": "Modules/Article"
    }

And ran composer du afterwards.

My configuration file for the package looks like this :

return [
    'modules'   =>  base_path('Modules'),
    'assets'    =>  public_path('modules'),
];

But when going to the route for this module I get Class Modules\Article\Http\Controllers\ArticleController does not exist. I don't get as to why I'm having this, since the module should be loading due to PSR4...

Am I missing something ?

Thanks.

Controller make error

I changed the config to app_path('modules'), so everything will be in app/modules instead of Modules/. But i'm getting the following.

php artisan module:make series
Created : app/modules/Series/start/global.php
Created : app/modules/Series/SeriesServiceProvider.php
Created : app/modules/Series/filters.php
Created : app/modules/Series/routes.php
Created : app/modules/Series/lang/en/series.php
Created : app/modules/Series/config/series.php
Created : app/modules/Series/database/seeds/SeriesDatabaseSeeder.php



  [ErrorException]
  file_put_contents(modules/Series/controllers/SeriesController.php): failed to open stream: No such file or directory



module:make name

Error Reflection when i upload to hosting

Hi, my site working fine in localhost but when i upload to server i got this error.. i have no clue

exception 'ReflectionException' with message 'Class Modules\Article\Controllers\ArticleController does not exist' in /home/andregg/public_html/myweb/bootstrap/compiled.php:241
Stack trace:
#0 /home/andregg/public_html/myweb/bootstrap/compiled.php(241): ReflectionClass->__construct('Modules\\Article...')
#1 /home/andregg/public_html/myweb/bootstrap/compiled.php(210): Illuminate\Container\Container->build('Modules\\Article...', Array)
#2 /home/andregg/public_html/myweb/bootstrap/compiled.php(585): Illuminate\Container\Container->make('Modules\\Article...', Array)
#3 /home/andregg/public_html/myweb/bootstrap/compiled.php(5779): Illuminate\Foundation\Application->make('Modules\\Article...')
#4 /home/andregg/public_html/myweb/bootstrap/compiled.php(5768): Illuminate\Routing\ControllerDispatcher->makeController('Modules\\Article...')
#5 /home/andregg/public_html/myweb/bootstrap/compiled.php(4971): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Modules\\Article...', 'index')
#6 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#7 /home/andregg/public_html/myweb/bootstrap/compiled.php(5330): call_user_func_array(Object(Closure), Array)
#8 /home/andregg/public_html/myweb/bootstrap/compiled.php(4996): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#9 /home/andregg/public_html/myweb/bootstrap/compiled.php(4984): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#10 /home/andregg/public_html/myweb/bootstrap/compiled.php(717): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#11 /home/andregg/public_html/myweb/bootstrap/compiled.php(698): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#12 /home/andregg/public_html/myweb/vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/Middleware.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#13 /home/andregg/public_html/myweb/bootstrap/compiled.php(7706): Barryvdh\Debugbar\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#14 /home/andregg/public_html/myweb/bootstrap/compiled.php(8309): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#15 /home/andregg/public_html/myweb/bootstrap/compiled.php(8256): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#16 /home/andregg/public_html/myweb/bootstrap/compiled.php(10895): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#17 /home/andregg/public_html/myweb/bootstrap/compiled.php(659): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#18 /home/andregg/public_html/myweb/public/index.php(49): Illuminate\Foundation\Application->run()
#19 {main}

-UPDATED:
i upload my site to shared hosting, and trying to change/rename folder controllers to Controllers and folder models to Models. and it works... but i dont understand why, i trying to install in my vps and run composer dump-autoload then work too without rename folder..

i confuse why i need to run composer dump-autoload again on the server when i upload entire project folder to server..

cannot rollback when using module:migrate ?

Hi, i cannot rollback when using module:migrate... but when i used your example publish-migrate i can rollback my migration..

but for past project i already did module:migrate, and now i want to do rollback i cannot..

ERROR message

production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'CreateProjectsTable' not found' in /Applications/MAMP/htdocs/somemedia/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:299 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] []

Class modules.finder does not exist

All artisan commands fail after enabling this module

{"error":{"type":"ReflectionException","message":"Class modules.finder does not exist","file":"\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":485}}

And the webapplication is broken too with the same error.

resource controller

Hi every body,,
please write complete example in this topic how to use resource controller ?
I found this error
No hint path defined for [edit].

regards

Same name controller bug

Hi when i use 2 Modules Sales and Purchase i put 2 same name controller inside them
but when i access myapp.dev/public/purchase/invoice
they give me Invoice Controller inside Sales module
why i cannot create same name of Controller ?

sorry for my bad english

this is my structure:

  • Modules
    • Sales
      • Controller
        • SalesController
        • InvoiceController
    • Purchase
      • Controller
        • PurchaseController
        • Invoice Controller

this is my routes
sales route

Route::group(['prefix' => 'sales'], function()
{
    Route::get('/', 'SalesController@index');
    Route::resource('invoice', 'InvoiceController');
}); 

purchase route

Route::group(['prefix' => 'purchase'], function()
{
    Route::get('/', 'PurchaseController@index');
    Route::resource('invoice', 'InvoiceController');
}); 

Error create tabel with underscore

hei, saya menemukan error pada saat membuat tabel dengan underscore pada saat di migrasi

dan solusi saya menambahkan 1 fungsi untuk membuat CamelCase untuk penamaan Class tabel
/**
* Erreg underscore to CamelCase.
*
* @return string
*/
protected function setCamelize($word) {
return preg_replace('/(^|_)([a-z])/e', 'strtoupper("\2")', $word);

}

dan mengganti bari ke 60 menjadi seperti ini
$classname = "Create".$this->setCamelize(ucwords($table))."Table";

Installing/updating module dependencies

Hi,

At the moment the only way to get a modules dependencies is to use the module::install command.
It would be nice if there was another command to get those composer dependencies, for instance if I have that module installed already.

Thanks,

New filter-make command wrong location

Hi,

I tried the new module:filter-make command, the filter was correctly generated, but at the root of the module.

It had the correct namespace though, Modules\Session\Http\Filters

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.