Download the PHP package mohammadmehrabani/repository-generator without Composer

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

Laravel - Repository Generator

version license

About

Repository Generator is a Laravel package that aims to generate repository and interface files and binding interfaces to implementations automatically for repository pattern. It gives you developing speed by automated operations. You can use this package for both ongoing and new projects.

Installation

You can install the package via Composer:

Next, you must install the service provider to config/app.php:

Then, if you want to customize folder names, namespaces, etc... You need to publish config with command:

Now you can edit config/repository-generator.php

Usage

Before using generate commdand you should customize config/repository-generator.php for your own use. You can simply use repository:generate command by terminal:

Next, you must install the service provider to config/app.php:

Repository file provided by RepositoryGenerator (optional use)

This package contains Repository.php which has similar functions to Eloquent. You can basically do something like below when you extend class from \MohammadMehrabani\RepositoryGenerator\Repository

This is completely personal and optional. I just created/copied some functions from Eloquent to add similar functionalities directly to repository file. So I can use same methods in my controller If I extend or implement this repository/interface for other database source like mongodb.

Built-in active() scope

Available Methods
All listed methods have same usage as Eloquent

Method Usage
select $repo->select('column1,'column2')
$repo->select(['column1, 'column2'])
active $repo->active()->get();
active() is equal to $repo->where('active_column', 1);
where $repo->where('column', 'value')->first();
$repo->where('column', '>', 10)->first();
whereIn $repo->whereIn('column', ['value1', 'value2'])->get();
orWhere $repo->orWhere('column', 'value')->first();
with $repo->with('relation')->get();
count $repo->where('column', 'value')->count();
find $repo->find($id);
$repo->find($id, ['column1', 'column2']);
first $repo->first();
$repo->first(['column1', 'column2']);
value $repo->where('id', $id)->value('name');
orderBy $repo->orderBy('column')->get(); // default 'asc'
$repo->orderBy('column', 'desc')->get();
get $repo->get();
$repo->get(['column1', 'column2']);
paginate $repo->paginate(20);
create $repo->create(['column1' => 'value', 'column2' => 'value']);
update $repo->update($id, ['column1' => 'value', 'column2' => 'value']);
delete $repo->where('column', 'value')->delete();
$repo->delete($id);
destroy $repo->destroy($id);

Contributing

Thank you for considering contributing to the Repository Generator! The contribution guide can be found in the CONTRIBUTING.md


All versions of repository-generator with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.0|~6.0|~7.0|^8.0
illuminate/console Version ~5.0|~6.0|~7.0|^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 mohammadmehrabani/repository-generator contains the following files

Loading the files please wait ....