Download the PHP package m-tech-stack/base-package without Composer
On this page you can find all versions of the php package m-tech-stack/base-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download m-tech-stack/base-package
More information about m-tech-stack/base-package
Files in m-tech-stack/base-package
Package base-package
Short Description This Project Base For Using Modules
License MIT
Informations about the package base-package
Installation
Composer Require
Run Vendor
How To Use
Create New Module
Create New Module inside Folder
- Main Module ( Ex. Payment )
- Sub Module ( Urway )
Create Migration inside module assuming Module is User
You can follow this structure for any other supported artisan commands
Similar to
Structure
All application files will be under app folder we have the following
-
Console
- Contains Custom Commands to be called like php artisan ScrapeHotelsCommand
- Contains Kernel that where we can configure schedules and import the commands
-
Data - it contains Data Classes
- Data classes are used to return well-structured data for a payload.
- Data classes are very useful to transfer data between the system components in a maintainable way
-
DTOs
- DTO (Data Transfer Object) is a simple utility and a small component that can be used to transfer data between the outside world to the inside world of either the Domain or the Module.
-
Exception - Here where we create our custom exceptions
-
Handlers - Used to make an action without need any feedback delete action for example or run a statement
-
Http
- Controllers ( Contains the controllers that use to handle outside requests and the presentation of data and communicating with routes,services to make the request )
- Middleware ( Convenient mechanism for inspecting and filtering HTTP requests entering the application like how we use it at Auth )
- Requests ( Where we create the expected requests and define their rules )
- Kernel ( The place where we define the middlewares )
-
Jobs - Here we create the jobs needed to be dispatched in the Queues.
-
Models - Contains all of your Eloquent model classes
-
Presenters
- Instead of outputting all the model fields and their loaded relationship,
- We can basically format that to an agreed structure that will output only the needed data and also rename fields
- To be more convenient than the original names in models or datasets
- We use AbstractPresenter to make Presenter support both Collection or single item
-
Providers - Service providers are the central place to configure the application
-
Repositories - provides an abstraction layer between the application logic and the data persistence layer
- We can say this is a middle man the handle the communication between Services and the Models
-
Services - Services are the basic classes to run logic.
-
Database
- Migration - Migrations are like version control for your database, allowing your team to modify and share the application's database schema
- Factories - define database records in a predictable and easily replicable way
- Seeders - the ability to seed your database with data using seed classes
- Routes - The route is a way of creating a request URL for your application