PHPackages                             tatuco/api-base-laravel - 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. tatuco/api-base-laravel

ActiveProject[API Development](/categories/api)

tatuco/api-base-laravel
=======================

Project base for api rest.

00[4 PRs](https://github.com/tatuco/api-base-laravel-tatuco/pulls)PHP

Since Jun 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tatuco/api-base-laravel-tatuco)[ Packagist](https://packagist.org/packages/tatuco/api-base-laravel)[ RSS](/packages/tatuco-api-base-laravel/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (5)Used By (0)

Laravel API
===========

[](#laravel-api)

### Instalacion

[](#instalacion)

Clonar el repositorio. comandos:

```
$ cd carpeta-del-proyecto
$ cp .env.example .env
$ php artisan key:generate
```

Crear la Base de Datos y colocar el nombre en la variable de entorno DB\_DATABASE `.env` . Correr los comandos:

```
$ php artisan migrate --seed
```

#### Get api:

[](#get-api)

probar endpoint `/api/`:

```
curl -X GET \
  http://127.0.0.1:8000/api/ \
  -H 'Content-Type: application/json' \
```

Response:

```
{
    "version": "Laravel Components 5.7.*",
    "time": {
        "date": "2018-08-22 20:07:17.618814",
        "timezone_type": 3,
        "timezone": "UTC"
    }
}
```

Crear Modelo correr el comando con all creara : controller, migration, service, model y repository de esa entidad

```
$ php artisan generator:tatuco Entity all

```

Validaciones:

```
// al guardar
 protected $validateStore = [
        'name' => 'required|max:255',
        'description' => 'required',
    ];
  //al actualizar
   protected $validateUpdate = [
          'name' => 'required|max:255',
          'description' => 'required',
      ];
```

ir a App/Core/TatucoController.php para establecer en la siguiente propiedad, las validaciones para todo el mundo

```
protected $validateDefault = [];
```

#### Do Where:

[](#do-where)

El doWhere es una parametro enviado atraves de la url hacia la api, con el objetivo de filtrar, las consultas desde el cliente, evitando crear endpoints sin fin para cada cosa, Ejemplo:

```
/api/users?where=[{"op": "eq", "field": "id", "value": 1}]
```

- Esto seria el quivalente a :

```
 SELECT * FROM users WHERE id = 1;
```

- donde op representa el operador (&lt;, &gt;, = ...) field representa la columna y value el valor que queremos obtener.

### Operadores

[](#operadores)

OperadorSimboloDescripcionctlike'%luis%'swlike'lu%'ewlike'%is'eq=gt&gt;gte&gt;=lte&lt;=lt&lt;ininbtentre- por default el operador es "eq", tambien podemos agregar tantas condiciones como queramos:

```
 where=[{"op":"bt","field":"id","value":[1,3],"filter":"and"},{"op":"in","field":"id","value":[5,9],"filter":"or"},{"op":"eq","field":"id","value":4,"filter":"or"}]
```

traduccion SQL:

```
 SELECT * FROM users WHERE id BETWEEN 1 AND 3 AND id IN (5, 9) OR id = 4;
```

- Ordenamiento:

```
   &order=["id","desc"]
```

- Relaciones:

```
&join=[{"table":"users","fk":"role.user_id","pk":"users.id","type":"inner"}]
```

- Especificar columnas, por defecto es \['\*'\]:

```
 &columns=["id as cedula", "name as Nombre"];
```

- Filtros por fechas: solo de debe agregar al where la propiedad "type" (date, year, month, day, time)

```
 /api/users?where=[{"op": "eq", "field": "date_created", "value": "2019-01-22", "type": "date"}]
 ```
### License

MIT License Luis.
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.5% 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/50722574?v=4)[ramirezl](/maintainers/ramirezl)[@ramirezl](https://github.com/ramirezl)

---

Top Contributors

[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (4304 commits)")[![tatuco](https://avatars.githubusercontent.com/u/32207157?v=4)](https://github.com/tatuco "tatuco (155 commits)")[![daylerees](https://avatars.githubusercontent.com/u/207870?v=4)](https://github.com/daylerees "daylerees (105 commits)")[![franzliedke](https://avatars.githubusercontent.com/u/249125?v=4)](https://github.com/franzliedke "franzliedke (92 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (71 commits)")[![jasonlewis](https://avatars.githubusercontent.com/u/829059?v=4)](https://github.com/jasonlewis "jasonlewis (48 commits)")[![sparksp](https://avatars.githubusercontent.com/u/243893?v=4)](https://github.com/sparksp "sparksp (37 commits)")[![YmendezM](https://avatars.githubusercontent.com/u/20343471?v=4)](https://github.com/YmendezM "YmendezM (37 commits)")[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (33 commits)")[![tobsn](https://avatars.githubusercontent.com/u/109529?v=4)](https://github.com/tobsn "tobsn (26 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (25 commits)")[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (20 commits)")[![JeffreyWay](https://avatars.githubusercontent.com/u/183223?v=4)](https://github.com/JeffreyWay "JeffreyWay (20 commits)")[![tillkruss](https://avatars.githubusercontent.com/u/665029?v=4)](https://github.com/tillkruss "tillkruss (17 commits)")[![JosephSilber](https://avatars.githubusercontent.com/u/1403741?v=4)](https://github.com/JosephSilber "JosephSilber (16 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (16 commits)")[![laurencei](https://avatars.githubusercontent.com/u/1210658?v=4)](https://github.com/laurencei "laurencei (14 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (13 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (11 commits)")[![ericlbarnes](https://avatars.githubusercontent.com/u/116662?v=4)](https://github.com/ericlbarnes "ericlbarnes (11 commits)")

### Embed Badge

![Health badge](/badges/tatuco-api-base-laravel/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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