cab-php/module-generator

A Laravel Package to generate module

dev-master 2023-02-23 01:01 UTC

This package is auto-updated.

Last update: 2024-10-23 04:15:23 UTC


README

Description

This package is developed for better housekeeping of PHP classes, it will help the developer to design a clean file structure of php files and classes.

Installation

Open you terminal, make sure the composer is installed in you machine and execute the following command to get the latest version of the package:

composer require cab-php/module-generator

In your config/app.php add TeamOptimus\ModuleGenerator\ModuleGeneratorServiceProvider::class to the end of the providers array:

Publish Configuration

php artisan vendor:publish --provider="TeamOptimus\ModuleGenerator\ModuleGeneratorServiceProvider::class" 

File structure sample

Please see the following files structure sample.

app/
	Modules/
		Controllers/
			ControllerClass.php
		Models/
			ModelClass.php
		Requests/
			RequestClass.php
		Repositories/
			RepositoryInterface.php
			RepositoryEloquent.php
		Commands/
			CommandClass.php
		Event/
			EventClass.php
		Listener/
			ListenerClass.php

You can also change the Path in the package configuration file.