New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

egeatech/laravel-models

A package to better handle database operations via Eloquent Models.
3,988 1
Install
composer require egeatech/laravel-models
Latest Version:4.0.0
PHP:^8.0
Laravel:6 – 10
License:MIT
Last Updated:Jan 9, 2024
Links: GitHub  ·  Packagist
Maintainer: egeatech

Laravel Exceptions

Latest Version on Packagist Total Downloads

A package to help handling Model CRUD operations.

Installation

This package now supports only Laravel 9, therefore requiring at least PHP 8.0. Support for PHP 7.4 is valid up to package version 2.3.3.

Via Composer

$ composer require egeatech/laravel-models

Usage

This package exposes an interface to manipulate database data, by using an implementation of the repository data pattern.

We provide both an interface and an abstract implementation to be extended. To develop APIs, the abstract class references Spatie Query Builder library for the find and index methods (for more details take a look at the source code).

To identify primary keys of eloquent Model classes, we also developed an IdentifierInterface (with an abstract class to be extended for specific needs) which is used by the BaseRepository when dealing with specific entity operations, such as update, delete or find.

At the moment we only support int or string PKs, composite keys support is not in the plan.

Change log

Please see the CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

The software is licensed under MIT. Please see the LICENSE file for more information.

Related Packages

foothing/laravel-repository

This package provides an implementation of the repository pattern for Laravel 5.

2,307 4
giordanolima/eloquent-repository

Repository pattern for Eloquent ORM with a powerfull cache for database queries.

1,576 29
pierresilva/laravel-repository

Reusable Laravel repository interface.

126 1
outrightvision/api-model

Generate Laravel-like Api Models

123,178 4
lerouse/laravel-repository

Repository implementation for Laravel.

20,037 5

Version History

Version Released PHP Laravel License
4.0.0 ^8.0 ^6|^7|^8|^9|^10 MIT
3.1.0 ^8.0 ^6|^7|^8|^9 MIT
3.0.2 ^8.0 ^6|^7|^8|^9 MIT
3.0.1 ^8.0 ^6|^7|^8|^9 MIT
3.0.0 ^8.0 ^6|^7|^8|^9 MIT