PHPackages                             lasarevs/laravel-rest - 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. [API Development](/categories/api)
4. /
5. lasarevs/laravel-rest

AbandonedArchivedLibrary[API Development](/categories/api)

lasarevs/laravel-rest
=====================

REST actions for controllers

058PHP

Since Jul 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/lasarevs/laravel-rest)[ Packagist](https://packagist.org/packages/lasarevs/laravel-rest)[ RSS](/packages/lasarevs-laravel-rest/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel REST actions
--------------------

[](#laravel-rest-actions)

Package included CRUD action traits, service trait, ApiController and transformer

How to install:

```
composer require lasarevs/laravel-rest
```

or add in **composer.json** record to require block **require**:

```
For Laravel >=5.6

```

```
"lasarevs/laravel-rest": "dev-master"
```

Using
-----

[](#using)

Extend You controllers from Lasarevs\\LaravelRest\\Controllers\\ApiController and use action traits for him/

In Lasarevs\\LaravelRest\\Traits\\Actions\* isset CRUD operations for controller

You need to set $modelClass variable in controller and using action traits

```
class SomeController
{
    use IndexAction, ShowAction, StoreAction, UpdateAction, DestroyAction;

    protected $modelClass = SomeModel::class;
}
```

If any of the methods that do not need it, just remove it

If you need all action, use GeneralActions

baseQueryFilter
---------------

[](#basequeryfilter)

if you need filtering data by default conditions, use baseQueryFilter method on you controller:

```
public function baseQueryFilter($query)
{
    return $query->where('owner', Auth::user()->id);
}
```

default paginate
----------------

[](#default-paginate)

ItemService trait have static variable $defaultPaginate. You will change it in your controllers

Filter using
------------

[](#filter-using)

Package include [filter](https://github.com/nemesis1988/FilterAndSorting%7Cfilter).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3337364?v=4)[Serhii Lazariev](/maintainers/lasarevs)[@lasarevs](https://github.com/lasarevs)

---

Top Contributors

[![lazarews](https://avatars.githubusercontent.com/u/40356864?v=4)](https://github.com/lazarews "lazarews (17 commits)")

### Embed Badge

![Health badge](/badges/lasarevs-laravel-rest/health.svg)

```
[![Health](https://phpackages.com/badges/lasarevs-laravel-rest/health.svg)](https://phpackages.com/packages/lasarevs-laravel-rest)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M96](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
