Download the PHP package sagni/repository without Composer

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

Table of Contents

OverView

This is a lightweight Laravel package designed to streamline the process of creating repositories design pattern in your projects. With this package, you can effortlessly generate the necessary files for your repository, including the concrete class, interface, and service provider.

Installation

Requirements

The package has been developed and tested to work with the following minimum requirements:

Install the Package

Run this command

Usage

Basic Usage

To create a repository using the make:repository command, simply run:

If the Repository directory does not exist within your app directory, the command will automatically create it for you. The above command will generate the following files:

  1. app/Repository/User/UserRepository.php
  2. app/Repository/User/UserRepositoryInterface.php
  3. app/Providers/User/UserRepositoryServiceProvider.php

If you prefer to keep the generated repository files directly in the app/Repository directory without any subdirectory, you can use the command below:

This command generates the same files mentioned above, but without the User subdirectory.

Repository Class

After generating the necessary files, you need to implement your repository logic. Open the UserRepository.php file created inside the app/Repository/User directory and modify it as needed:

Repository Interface

Edit the UserRepositoryInterface.php file inside the app/Repository/User directory to define the repository methods:

Service Provider

The UserRepositoryServiceProvider.php file located in app/Providers/User binds the repository interface to its implementation. You don't need to modify this file, as it's automatically generated.

And the following will be automatically added in your project's config/app.php

Contribution

If you wish to make any changes or improvements to the package, feel free to make a pull request.

License

The MIT License (MIT). Please see License File for more information.

Conclusion

The Sagni Repository package greatly simplifies the process of creating repository classes in your Laravel application. By automating the generation of repository files, interfaces, and service providers, it encourages a structured and organized approach to data access. Feel free to expand on the base implementation to tailor it to your project's specific needs.

If you have any questions, feedback, or contributions, please don't hesitate to reach out to the package author:


All versions of repository with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/console Version ^8.0|^9.0|^10.0
symfony/console Version ^5.0|^6.0
illuminate/support Version ^8.0|^9.0|^10.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 sagni/repository contains the following files

Loading the files please wait ....