Download the PHP package lencione/laravel-modules without Composer

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

Gerador de módulos para projetos Laravel com estrutura padronizada.

Cria a árvore app/Modules/{Modulo}/ com pastas convencionadas e arquivos base a partir de stubs. Carrega automaticamente os arquivos de rotas (web.php e api.php) de cada módulo.

Requisitos

Instalação

O LaravelModulesServiceProvider é registrado automaticamente via package discovery do Laravel. Não há nada para registrar manualmente.

O que o package faz

1. Comandos artisan

Comando Descrição
make:module {nome} {pasta?} Cria a estrutura completa do módulo (ou apenas uma pasta). Quando completa, também gera controller, requests Store/Update, resource, model, service e arquivos de rota.
module:action {modulo} {target} Cria uma action.
module:controller {modulo} {target?} Cria um controller. Sem target, usa {modulo}Controller.
module:event {modulo} {target} Cria um event.
module:job {modulo} {target} Cria um job.
module:listener {modulo} {target} Cria um listener.
module:model {modulo} {target?} Cria um model. Sem target, usa {modulo}.
module:request {modulo} {target} Cria um FormRequest.
module:resource {modulo} {target?} Cria um JsonResource. Sem target, usa {modulo}Resource.
module:route {modulo} Cria os arquivos web.php e api.php do módulo.
module:rule {modulo} {target} Cria uma ValidationRule.
module:service {modulo} {target?} Cria um service. Sem target, usa {modulo}Service.

Exemplos:

Subdiretórios funcionam usando / no target:

2. Auto-load de rotas

Para cada app/Modules/{Modulo}/Routes/web.php e api.php encontrado, o package registra automaticamente as rotas:

3. BaseService

Service genérico com CRUD básico em Lencione\LaravelModules\Services\BaseService.

Métodos disponíveis:

Método Descrição
getAll(?int $perPage = null) Retorna paginado, ordenado por id. Aceita perPage opcional.
getAllWithoutPagination() Retorna Collection completa, ordenada por id.
getById(int\|string $id) Retorna o item ou lança ModelNotFoundException (404 automático no Laravel).
store(array $validated) Cria via model->create().
update(int\|string $id, array $validated) Atualiza e retorna o model.
delete(int\|string $id) Deleta.

Estrutura criada por make:module

Customização

Publicando os stubs

Se quiser editar os templates usados na geração:

Os arquivos vão para stubs/ na raiz do projeto. O package usa primeiro os stubs locais; se não existirem, cai nos do package.

Stubs disponíveis:

Placeholders disponíveis nos stubs:

Publicando o config

Gera config/modules.php:

Opções:

Licença

MIT


All versions of laravel-modules with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.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 lencione/laravel-modules contains the following files

Loading the files please wait ...