PHPackages                             wendelladriel/laravel-exa - 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. [Framework](/categories/framework)
4. /
5. wendelladriel/laravel-exa

ActiveProject[Framework](/categories/framework)

wendelladriel/laravel-exa
=========================

Opinionated Modularized API Skeleton for Laravel

v5.1.0(7mo ago)118709MITPHPPHP ^8.4CI passing

Since Feb 19Pushed 7mo ago5 watchersCompare

[ Source](https://github.com/WendellAdriel/laravel-exa)[ Packagist](https://packagist.org/packages/wendelladriel/laravel-exa)[ Fund](https://www.paypal.me/wendelladriel)[ GitHub Sponsors](https://github.com/WendellAdriel)[ RSS](/packages/wendelladriel-laravel-exa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (21)Used By (0)

ExA
===

[](#exa)

 Opinionated Modularized API Skeleton for Laravel

[![Packagist](https://camo.githubusercontent.com/59748fb655f1847c826fa42c788c611a77be5665f76c50f59d48810a53c6b0e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f57656e64656c6c41647269656c2f6c61726176656c2d6578612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-exa)[![PHP from Packagist](https://camo.githubusercontent.com/6f460d016bd6f550b70778ad384601e95d00f1bb706d3ad15c56de6af2c6f701/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f57656e64656c6c41647269656c2f6c61726176656c2d6578612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-exa)[![Laravel Version](https://camo.githubusercontent.com/5ac80bc08347d47d1d16f8fbe0fd12bdf2e22d6d6e1baebb8a5f583cfd15dd61/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/WendellAdriel/laravel-exa)

 [Features](#features) | [Usage](#using-the-template) | [Configuration](#configuring-the-application) | [Structure](#application-structure) | [ExA Classes](#exa-classes) | [Credits](#credits) | [Contributing](#contributing)

Features
--------

[](#features)

- Your API running on the latest version of Laravel and PHP
- API Documentation with Swagger
- Laravel Pint configuration (very opinionated)
- Pest v4 for Tests with 100% type coverage
- Base classes to speed up the development
- DTOs with [Laravel Validated DTO](https://github.com/WendellAdriel/laravel-validated-dto)
- Slack Client for notifications
- API structured in modules
- JWT for Authentication
- Users management out-of-the-box with simple roles system
- Logs on DB for user logins and for actions made on models
- Log actions made by users with the `created_by`, `updated_by` and `deleted_by` fields. Use the `$table->userActions()` in your migrations to add these fields.
- Strict mode for Models + automatic eager load relationships
- Dates use `CarbonImmutable` by default
- Prohibit destructive commands in PROD
- Strong password validation by default
- Rector configuration for better code

Using the Template
------------------

[](#using-the-template)

```
composer create-project --prefer-dist wendelladriel/laravel-exa my-app
```

Configuring the Application
---------------------------

[](#configuring-the-application)

Copy the `.env.example` to `.env` and update the needed values

```
cp .env.example .env
```

Install the dependencies

```
composer install
```

Generate the application key and JWT secret

```
php artisan key:generate --ansi && php artisan jwt:secret
```

Run the migrations

```
php artisan migrate
```

Update the admin user in the `database/seeders/DatabaseSeeder.php` file and run the seeds

```
php artisan db:seed
```

Application Structure
---------------------

[](#application-structure)

The `app` folder contains only the files of a default **Laravel** installation.

The `exa` folder contains all the base classes provided by this **skeleton** to help you to develop your **API**.

The `modules` folder contains the code for your application. By default, you have an **Auth** module for **Authentication**, and **User management out-of-the-box**. It also provides a **Common** module that you can put shared logic for your application.

### Creating Modules

[](#creating-modules)

To create new modules you can use this command

```
php artisan make:module MODULE_NAME
```

This will create a new module inside the `modules` folder with the same structure of the other modules. It will create the module disabled by default. To enable it, add the new module name to the `config/modules.php` file.

### Commands Available

[](#commands-available)

Run the linter (Pint) and Rector in the whole codebase

```
composer lint
```

Run the linter (Pint) and Rector in dry-run mode

```
composer test:lint
```

Run the type coverage tests

```
composer test:types
```

Run the test suite

```
composer test:unit
```

Update the Swagger docs

```
composer swagger
```

Run the linter (Pint) in staged files and update the Swagger docs

```
composer prepare
```

Runs the commands `test:lint`, `test:types` and `test:unit`

```
composer test
```

ExA Classes
-----------

[](#exa-classes)

Inside the `exa` folder, there are a lot of classes provided by this **skeleton** to help you to develop your **API**.

### DTOs

[](#dtos)

- `DatatableDTO` - This DTO provides basic filters for fetching data for datatables.
- `DateRangeDTO` - This is an extension of the `DatatableDTO` providing additional parameters for date filters.

### Exceptions

[](#exceptions)

- `ExaException` - Base class that all your custom exceptions should extend, so it can be handled properly by the `app/Exceptions/Handler`.
- `AccessDeniedException` - Exception used for actions that the user is not allowed to perform.

### Http

[](#http)

#### Middlewares

[](#middlewares)

- `BlockViewerUsers` - This middleware is a middleware applied to all routes that blocks any users with the role **VIEWER** to access any routes that are not **GET** routes.
- `HasRole` - This middleware can be applied to routes that can be accessed only by users with a specific role or **ADMINS** that have full access.

#### Responses

[](#responses)

- `ApiErrorResponse` - The class to be used to return any error responses, configured to be used by the `app/Exceptions/Handler`.
- `ApiSuccessResponse` - The class to be used to return any success responses, configured to be used with **JSON Resources**.
- `NoContentResponse` - The class to be used to return empty responses.

### Models

[](#models)

- `BaseModel` - Base class that all your models should extend, already configured with the `CommonQueries`, `LogChanges` and `UserActions` Traits.
- `ChangeLog` - Model for the table that logs all changes made on other models.
- `CommonQueries` - This Trait provides a lot of methods for common queries that you can use with your models.
- `HasUuidField` - This Trait provides UUID field support for models that don't want the UUID to be the primary key.
- `LogChanges` - This Trait provides listeners for logging changes on the models. Check the class to know how you can customize your models with the properties of this Trait.
- `UserActions` - This Trait provides listeners for logging changes made by users on the models populating the `created_by`, `updated_by` and `deleted_by` fields. Check the class to know how you can customize your models with the properties of this Trait.

### Services

[](#services)

- `SlackClient` - Class to send notifications to **Slack**. You need to add the needed configuration in your env, check the `config/services.php` file for the slack service to know how to configure it.

### Support

[](#support)

- `Datatable` - Class that provides functions for paginating, sorting and filtering data.
- `Formatter` - Class that provides common values in constants and methods to format data in your application.
- `ChangeAction` - Enum used by the `LogChanges` Trait.
- `SortOption` - Enum for the sort order used by the `DatatableDTO`.

Credits
-------

[](#credits)

- [Wendell Adriel](https://github.com/WendellAdriel)
- [All Contributors](../../contributors)

Contributing
------------

[](#contributing)

Check the **[Contributing Guide](CONTRIBUTING.md)**.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance62

Regular maintenance activity

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

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

Every ~49 days

Recently: every ~128 days

Total

20

Last Release

232d ago

Major Versions

v1.7.3 → v2.02024-03-28

v2.1.0 → v3.0.02024-04-27

v3.1.1 → v4.0.02025-03-12

v4.0.0 → v5.0.02025-09-22

PHP version history (3 changes)v1.0.0PHP ^8.2

v2.0PHP ^8.3

v4.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/565cea386dcfc4df5188a338113624866e65e4b31b209a7a99bb6c4c272e8731?d=identicon)[wendell\_adriel](/maintainers/wendell_adriel)

---

Top Contributors

[![WendellAdriel](https://avatars.githubusercontent.com/u/11641518?v=4)](https://github.com/WendellAdriel "WendellAdriel (98 commits)")[![msoares94](https://avatars.githubusercontent.com/u/12193221?v=4)](https://github.com/msoares94 "msoares94 (11 commits)")

---

Tags

apiboilerplatedockerlaravelskeletontemplateapiframeworklaravelboilerplateSkeleton

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/wendelladriel-laravel-exa/health.svg)

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)

PHPackages © 2026

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