PHPackages                             anexia/laravel-basemodel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. anexia/laravel-basemodel

ActiveLibrary[Database &amp; ORM](/categories/database)

anexia/laravel-basemodel
========================

A laravel module that provides traits to extend eloquent model's filter, search, sorting, pagination, functionality

1.0.1(7y ago)1143MITPHPPHP &gt;=5.6.4

Since Oct 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/anexia-it/anexia-laravel-basemodel)[ Packagist](https://packagist.org/packages/anexia/laravel-basemodel)[ RSS](/packages/anexia-laravel-basemodel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Anexia BaseModel
================

[](#anexia-basemodel)

A Laravel package used to provide extended basic functionality (filtering, sorting, pagination) to eloquent models.

1. Installation and configuration
---------------------------------

[](#1-installation-and-configuration)

Install the module via composer, therefore adapt the `require` part of your `composer.json`:

```
"require": {
    "anexia/laravel-basemodel": "1.0.0"
}

```

Now run

```
composer update [-o]

```

to add the packages source code to your `/vendor` directory and update the autoloading.

2. Usage
--------

[](#2-usage)

### 2.1. Models

[](#21-models)

Use the BaseModelInterface in combination with the BaseModelTrait in all models that are supposed to support the base functionality (filtering, sorting, pagination, ...).

```
// model class app/Post.php
