Download the PHP package filefabrik/modular without Composer

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

Dev Laravel 11 and Livewire 3 fixing some stuff and try out

min Laravel 10 (tested with 11) min Livewire 3.4.9 min php 8.2

internachi/modular

Build Status Coverage Status Latest Stable Release MIT Licensed Follow @inxilpro on Twitter Follow @chris@any.dev on Mastodon

internachi/modular is a module system for Laravel applications. It uses Composer path repositories for autoloading, and Laravel package discovery for module initialization, and then provides minimal tooling to fill in any gaps.

This project is as much a set of conventions as it is a package. The fundamental idea is that you can create “modules” in a separate app-modules/ directory, which allows you to better organize large projects. These modules use the existing Laravel package system, and follow existing Laravel conventions.

Walkthrough Video

Intro video

Installation

To get started, run:

Laravel will auto-discover the package and everything will be automatically set up for you.

Publish the config

While not required, it's highly recommended that you customize your default namespace for modules. By default, this is set to Modules\, which works just fine but makes it harder to extract your module to a separate package should you ever choose to.

We recommend configuring a organization namespace (we use "InterNACHI", for example). To do this, you'll need to publish the package config:

Create a module

Next, let's create a module:

Modular will scaffold up a new module for you:

It will also add two new entries to your app's composer.json file. The first entry registers ./app-modules/my-module/ as a path repository, and the second requires modules/my-module:* (like any other Composer dependency).

Modular will then remind you to perform a Composer update, so let's do that now:

Optional: Config synchronization

You can run the sync command to make sure that your project is set up for module support:

This will add a Modules test suite to your phpunit.xml file (if one exists) and update your PhpStorm Laravel plugin configuration (if it exists) to properly find your module's views.

It is safe to run this command at any time, as it will only add missing configurations. You may even want to add it to your post-autoload-dump scripts in your application's composer.json file.

Usage

All modules follow existing Laravel conventions, and auto-discovery should work as expected in most cases:

Commands

Package Commands

We provide a few helper commands:

Laravel “make:” Commands

We also add a --module= option to most Laravel make: commands so that you can use all the existing tooling that you know. The commands themselves are exactly the same, which means you can use your custom stubs and everything else Laravel provides:

Other Laravel Commands

In addition to adding a --module option to most make: commands, we’ve also added the same option to the db:seed command. If you pass the --module option to db:seed, it will look for your seeder within your module namespace:

Vendor Commands

We can also add the --module option to commands in 3rd-party packages. The first package that we support is Livewire. If you have Livewire installed, you can run:

Blade Components

Your Laravel Blade components will be automatically registered for you under a component namespace. A few examples:

File Component
app-modules/demo/src/View/Components/Basic.php <x-demo::basic />
app-modules/demo/src/View/Components/Nested/One.php <x-demo::nested.one />
app-modules/demo/src/View/Components/Nested/Two.php <x-demo::nested.two />
app-modules/demo/resources/components/anonymous.blade.php <x-demo::anonymous />
app-modules/demo/resources/components/anonymous/index.blade.php <x-demo::anonymous />
app-modules/demo/resources/components/anonymous/nested.blade.php <x-demo::anonymous.nested />

Customizing the Default Module Structure

When you call make:module, Modular will scaffold some basic boilerplate for you. If you would like to customize this behavior, you can do so by publishing the app-modules.php config file and adding your own stubs.

Both filenames and file contents support a number of placeholders. These include:

Comparison to nwidart/laravel-modules

Laravel Modules is a great package that’s been around since 2016 and is used by 1000's of projects. The main reason we decided to build our own module system rather than using laravel-modules comes down to two decisions:

  1. We wanted something that followed Laravel conventions rather than using its own directory structure/etc.
  2. We wanted something that felt “lighter weight”

If you are building a CMS that needs to support 3rd-party modules that can be dynamically enabled and disabled, Laravel Modules will be a better fit.

On the other hand, if you're mostly interested in modules for organization, and want to stick closely to Laravel conventions, we’d highly recommend giving InterNACHI/Modular a try!


All versions of modular with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-simplexml Version *
ext-dom Version *
composer/composer Version ^2.1
illuminate/support Version ^10|^11|12.x-dev|dev-master
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 filefabrik/modular contains the following files

Loading the files please wait ....