Download the PHP package wendelladriel/laravel-more without Composer

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

Laravel MoRe

Implementation of the Repository Pattern using Laravel Model binding

The Repository Pattern

Repositories are used to wrap the logic to access the data sources of our applications. They can be used to improve the maintainability of an application by providing a central point in the code where the data sources are accessed.

Installation

You can publish the config file with:

Usage

This package provides a BaseRepository class that you can extend to create your own Repositories.

Example:

By creating a class like the one above you will have access to all the methods below.

Get All Records

To get all the records you can use the getAll method:

Examples:

Get All Records By Attribute

To get all the records matching an attribute you can use the getAllBy method:

Examples:

Get Single Record By Attribute

To get a single record matching an attribute you can use the getBy method:

Examples:

Get Single Record By Attribute Or Fail

To get a single record matching an attribute or throw an exception if no record is found you can use the getByOrFail method:

Examples:

Get Single Record By Params

To get a single record matching multiple attributes you can use the getByParams method:

Examples:

Get Single Record By Params Or Fail

To get a single record matching multiple attributes or throw an exception if no record is found you can use the getByParamsOrFail method:

Examples:

Get All Records By Params

To get all the records matching multiple attributes you can use the getAllByParams method:

Examples:

Update Records By Attribute

To update one or more records you can use the updateBy method:

Examples:

Delete Records By Attribute

To delete one or more records you can use the deleteBy method:

Examples:

Create New Record

To create a new record you can use the create method:

Examples:

Disable Global Scope

If your model has a Global Scope and you need to disable it for any queries you can use the disableGlobalScope method:

Examples:

Enable Glogal Scope

If your model has a disabled Global Scope and you need to enable it again, you can use the enableGlobalScope method:

Examples:

Protected Helper Methods

Besides all public methods above the BaseRepository also provides the following protected methods that you can use in your Repositories classes:

Get Table Name

If you need to get the table name for the model binded to the repository you can use the getTable method:

Examples:

New Query Util

To create new queries you can use the newQuery helper method:

Examples:

TO DO

Credits

Contributing

All PRs are welcome.

For major changes, please open an issue first describing what you want to add/change.


All versions of laravel-more with dependencies

PHP Build Version
Package Version
Requires php 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 wendelladriel/laravel-more contains the following files

Loading the files please wait ....