Download the PHP package itvisionsy/laravel-modules without Composer

On this page you can find all versions of the php package itvisionsy/laravel-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-modules

laravel-modules

Modules management library for laravel 5.1

[Packagist]() [license]() Build Status [PHP]() [Laravel]()

Allows modules structure of your project. Each module can have its views, config, routes, controllers, ...

Installation

  1. The package relies on the composer PSR-4 loader like all laravel projects. Use the composer command:

  2. Add \ItvisionSy\Laravel\Modules\ServiceProvider::class to providers section in your config/app.php file:

  3. Publish the config file using the command

    This will copy the modules.php config file to your config folder.

  4. Modify the config/modules.php config file as needed.

How It Works

Your modules should go in a root modules folder. By default this is app/Modules which maps to the namespace \App\Modules.

Each of your modules will have its own folder inside the modules root folder, the folder will be named after the module name, and will map to the namespace \App\Modules\{ModuleName}.

Each module will contain a base module definition class, which (by default) will be named Module.php and maps to the namespace \App\Modules\{ModuleName}\Module. This class will act as the key generator for the module URLs, routes, and other framework-related values.

Each module will contain its data models, controllers, views, routes, and other project files as usual. The composer PSR-4 loader should take care of loading your module files and classes properly.

Your module controllers (by default go into the Http/Controllers folder) should inherite the ItvisionSy\Laravel\Modules\Controller class to make views rendering and other tasks easier.

Creating Modules

To create a new module, you can use the artisan command

Values of id, name, and url are strings. The name and URL parts are optional. URL will be used to generate the URLs of the module more human friendly. Name is used for human identification and readability only.

This command will create the basic folder structure inside the modules folder, along with the base module and a sample routes (inside Http/routes.php), controller (inside Http/Controllers/), and view (inside Views).

As you have the basic structure, you can start creating your files and classes as normal. Nothing special to worry about.

What is Store Handler

It is a feature allows a per-module configuration to be saved in the database, in addition to a flag to identify if a module is enabled or disabled.

You need a class that implements the ItvisionSy\Laravel\Modules\Interfaces\KeyValueStoreInterface interface, which defines two methods: set($key, $value) and get($key, $default=null).

There are two ready-made implementations in the \ItvisionSy\Laravel\Modules\StoreHandlers\ namespace, one is calle MysqlSimpleDbStoreHandler and the other SqliteSimpleDbStoreHandler, which utilizes a DB connection (default one by default) to store the config in a simple key/value table.

The feature comes disabled by default by setting the class \ItvisionSy\Laravel\Modules\StoreHandlers\DummyStoreHandler as the store handler. To enable it, just change the store_handler config setting in the config/modules.php config file to use one of the two classes mentioned above.

Also, you need to create the database table for the store. We provided a simple artisan command to do that. After you have configured everything correctly, simply execute the following command: php artisan modules:db:init which will take care about creating the database table by executing the following SQL command:

You can create the table manually, and override its name by extending the class and change the $tableName property.

Thanks


All versions of laravel-modules with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version 5.1.*
nette/reflection Version ^2.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package itvisionsy/laravel-modules contains the following files

Loading the files please wait ....