Download the PHP package cuongnd88/lara-repository without Composer

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

Auto-generated Repository Pattern in Laravel

A repository is a separation between a domain and a persistent layer. The repository provides a collection interface to access data stored in a database, file system or external service. Data is returned in the form of objects.

The main idea to use Repository Pattern in a Laravel application is to create a bridge between models and controllers. This pattern keeps your Laravel code clean and safe, it is worth using repositories to separate the responsibility for which the model should never be responsible.

This package assists to automatically generate the Interface, Repository, Model and Controller files in saving your time and supporting to focus on implementing the logic. Especially, you do not need binding the interface and repository class in Service provider class

1-Install cuongnd88/lara-repository using Composer.

2-Add the following service provider in config/app.php

3-Run make:repository command

--interface is to indicate the Interface file.

--repository is to indicate the Repository file.

--model is to allocate the Model. If not exists, it will confirm to create a model.

--controller option is to create the Controller file. With @resource, it generates a resource controller class.

Sample Usage

Let start code less by running the command:

The Repositories directory is created when you run the command. All interface and repository files are stores in the app/Repositories/Language directory.

Now inside StaffController, StaffInterface already injected into the construct method. This action is called Dependency Injection

Please take a look the auto-generated repositories.php in config directory

The Repository Pattern also allows us to write less code inside our Controllers and that makes it even better rather having a giant code in the Controller which isn't what we want if we are aiming for better maintainability and readability. Let's keep it that way, clean controllers.

Demo

This is demo soure code

app/Repositories

Staff/StaffController.php


All versions of lara-repository with dependencies

PHP Build Version
Package Version
No informations.
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 cuongnd88/lara-repository contains the following files

Loading the files please wait ....