Download the PHP package irfan-chowdhury/repository-maker without Composer

On this page you can find all versions of the php package irfan-chowdhury/repository-maker. 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 repository-maker

# Laravel Repository Maker

About Repository Design Pattern:

The Repository Design Pattern is a software design principle commonly used in the development of applications that interact with data storage systems, such as databases. It provides an abstraction layer between the application's data access logic and the underlying data storage, promoting separation of concerns and modularity in the codebase.

In short, the Repository Design Pattern involves creating classes or interfaces called repositories, which encapsulate the methods and operations for interacting with the data storage. These repositories abstract away the details of how data is retrieved, stored, and manipulated, making the application's codebase more maintainable and testable. This pattern also helps in centralizing data access logic, improving code reusability, and facilitating the management of complex queries.

Requirement:

Installation

You can install the package via composer:

Setup

After installation goto config/app.php and paste the bellow line in "providers" array

Usage

If you now run php artisan you will see some new commands in the list:

Commands

Note:

Example

Let you have a User Model according to this namespace App\Models\User.php

Creating Interface

it will generate an interface according to this path app/Contracts/UserContract.php. Here we named this interface as Contract.

Creating a Base Interface

It is optional but if you want to use a base, it will generate an interface according to this path app/Contracts/BaseContract.php. Here we named this interface as Contract.

Creating an Interface with extends Base Interface

If you want to extends with the Base Interface, it will generate an interface according to this path app/Contracts/UserContract.php and extends with BaseContract.

Note: But before using extends with the Base interface, you have to create a BaseContract before (using only make:contract-base).

Creating Repository

It will generate a repository class according to this path app/Repositories/UserRepository.php.

Creating Repository with interface

It will generate a repository class with interface according to this path app/Repositories/UserRepository.php and app/Contracts/UserContract.php.

Creating a Base Repository

It is optional but if you want to use a base, it will generate a repository class according to this path app/Repositories/BaseRepository.php.

Creating a Repository with extends the Base Repository

If you want to extends with Base Repository, it will generate a Repository class according to this path app/Repositories/UserRepository.php and extends with BaseRepository.

Note: But before using extends with the Base repository, you have to create a BaseRepository class before (using only make:repository-base).

Creating Service Class

It is optional but sometimes we need to use a service class to maintain business logic. If you want to use a service class, it will generate a service class according to this path app/Services/UserService.php.

Creating Repository with interface and service

It will generate a repository class with interface and service according to this path app/Repositories/UserRepository.php, app/Contracts/UserContract.php, app/Services/UserService.php.


After then you have to register in a service provider -

Inject in Controller/Service class

In your controlleror, you can use them,

Visit

Packagist : https://packagist.org/packages/irfan-chowdhury/repository-maker

Credits


All versions of repository-maker with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laravel/framework Version >=8.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 irfan-chowdhury/repository-maker contains the following files

Loading the files please wait ....