PHPackages                             nickfla1/laravel-validated-api-requests - 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. nickfla1/laravel-validated-api-requests

ActiveLibrary[API Development](/categories/api)

nickfla1/laravel-validated-api-requests
=======================================

Simple base API request with validation mechanisms

0.1.0(5y ago)427[3 issues](https://github.com/nickfla1/laravel-validated-api-requests/issues)MITPHPPHP &gt;=7.0

Since Jun 13Pushed 5y agoCompare

[ Source](https://github.com/nickfla1/laravel-validated-api-requests)[ Packagist](https://packagist.org/packages/nickfla1/laravel-validated-api-requests)[ RSS](/packages/nickfla1-laravel-validated-api-requests/feed)WikiDiscussions master Synced yesterday

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

Laravel Validated API Requests
------------------------------

[](#laravel-validated-api-requests)

This package allows you to use Laravel's validators on API requests. This package is intented to be used only on API requests as the same behaviour can be achieved for regular requests using Laravel's `FormRequest`.

### Installation

[](#installation)

```
composer require nickfla1/laravel-validated-api-requests
```

**Requirements**

Library/ExtVersionphp&gt;=7.0.\*laravel/framework&gt;=5.5### Basic Usage

[](#basic-usage)

**Request**

```
use Nickfla1\Utilities\ApiRequest;

class FooRequest extends ApiRequest
{
    /**
     * Defines if the request should fire an ApiRequestException
     * on validation failure.
     *
     * @var bool
     */
    protected $firesException = true;

    /**
     * Define validation rules.
     *
     * @return array|null
     */
    protected function rules()
    {
        return [
            'foo' => 'required|string|max:30',
            'bar' => 'required|mail'
        ];
    }
}
```

**Controller**

```
class TheController extends Controller
{
    public function index(FooRequest $request)
    {
        // If we get here the request was validated successfully!
    }
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance5

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd26ce10509f341cf4fd0dde3836f70b9abe32dad5f170fdb78671985804e5b8?d=identicon)[nickfla1](/maintainers/nickfla1)

---

Top Contributors

[![nickfla1](https://avatars.githubusercontent.com/u/1572060?v=4)](https://github.com/nickfla1 "nickfla1 (12 commits)")[![dantinod](https://avatars.githubusercontent.com/u/46503377?v=4)](https://github.com/dantinod "dantinod (2 commits)")

---

Tags

apicomposercomposer-librarycomposer-packageexceptionsjsonjson-apilaravellaravel-5-packagelaravel-frameworklaravel-packagelaravel5phpphp7restrest-apirestfulrestful-apivalidationvalidator

### Embed Badge

![Health badge](/badges/nickfla1-laravel-validated-api-requests/health.svg)

```
[![Health](https://phpackages.com/badges/nickfla1-laravel-validated-api-requests/health.svg)](https://phpackages.com/packages/nickfla1-laravel-validated-api-requests)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sburina/laravel-whmcs-up

WHMCS API client and user provider for Laravel

271.3k](/packages/sburina-laravel-whmcs-up)

PHPackages © 2026

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