Download the PHP package williamug/modular without Composer

On this page you can find all versions of the php package williamug/modular. 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 modular

Latest Version on Packagist run-tests License

Modular

The Modular provides a modular architecture for Laravel applications, allowing you to organize your application into self-contained modules. This package is inspired by the concept of modular development, making it easier to manage large applications.

Features

Installation

Install the package via Composer:

Run the installation command to set up the package:

This will publish the configuration file and configure your frontend.

Available Commands

Creating a Module

To create a new module, use the module:create command:

This will create a Expense module in the Modules directory with the following structure:

Enabling and Disabling Modules

Enable a module:

Disable a module:

Deleting a Module

Delete a module:

Running Migrations

Run migrations for a specific module:

Seeding Data

Seed data for a specific module:

Publishing Assets

Publish assets for a specific module:

Generating Files

Generate a controller within a module:

Generate a model within a module:

Generate a migration within a module:

Viewing Module Information

View detailed information about a module:

Modular Navigation

Modules can register navigation items by adding a navigation key to their module.json. You can use advanced features like icons, groupings, and permissions:

Helper Usage

In your sidebar Blade view, use the helper:

Grouped Navigation Example

Blade Directive Usage

Or use the Blade directive for a concise syntax:

This will automatically render grouped navigation items from all enabled modules, showing icons and respecting permissions.

Modular Content Injection

Modules can inject custom content into parent layouts or pages (e.g., settings, dashboard widgets, or any slot) by adding a settings, widgets, or content key to their module.json:

Helper Usage for Settings

In your unified settings page:

Or use the Blade directive:

Helper Usage for Widgets

In your dashboard:

Or use the Blade directive:

Helper Usage for Generic Content

In any parent layout or page:

Or use the Blade directive:

Example Module Content (banner.blade.php)

Example Project

Setting Up a Expense Module

  1. Create the Module:

  2. Add Routes: Edit Modules/Expense/routes/web.php:

  3. Create a Controller:

    Edit Modules/Expense/Http/Controllers/ExpenseController.php:

  4. Add a Model:

    Edit the generated migration file to define the posts table schema.

  5. Run Migrations:

  6. Enable the Module:

  7. Access the Module: Visit /expense in your browser to see the Expense module in action.

API-Only Projects

For API-only projects, the package automatically skips frontend scaffolding. You can still use all the commands to manage modules and their backend logic.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss changes.

License

This package is open-source software licensed under the MIT license.


All versions of modular with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3||^8.4
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
illuminate/support Version ^11.0||^12.0
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 williamug/modular contains the following files

Loading the files please wait ...