Download the PHP package inquiloper/laravel-baserepository without Composer

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

Laravel Base Repository

Description

A wrapper around eloquent's main features so you can share them among your own repositories

Installation

In order to install this package, all you have to do is execute the following line in your console composer require inquiloper/laravel-baserepository

Then in your repositories

That's it, you're ready to rock now!

Documentation

Let's suppose you have this function in your controller where you type-hint your repo

public function users(UsersRepositoryInterface $usersRepo){}

Now, the methods you have available are:

Find all elements of the model

$usersRepo->findAll()

Find one element by $field

$usersRepo->findOneBy(Array $fields)

Find All elements by $fields

$usersRepo->findAllBy(Array $fields)

Create and save to the DB

$usersRepo->create(Array $data)

Update with $data by $fields

$usersRepo->updateBy(Array $fields, Array $data) public function with($relationships);

Update with $data by $fields

$usersRepo->updateBy(Array $fields, Array $data)

Delete by $fields

$usersRepo->deleteBy(Array $fields)

Eager-load relationships

$usersRepo->with(['posts', 'comments'])->findOneBy(['id' => 1])

Dynamic methods

You can call the findOneBy method with a dynamic name like so:

$usersRepo->findOneByName('John Doe')

This will translate to select * from users where name = 'John Doe' limit 1

The dynamic calling will automatically snake_case anything after findOneBy , so Name converts to name, UserEmail to user_email and so on. You can turn this off and the method will add the where clause with the literal name

$usersRepo->findOneByWpEmail('[email protected]' , false)

This will translate to select * from users where WpEmail = '[email protected]' limit 1


All versions of laravel-baserepository 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 inquiloper/laravel-baserepository contains the following files

Loading the files please wait ....