PHPackages                             redot/laravel-api-scaffold - 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. redot/laravel-api-scaffold

ActiveProject[API Development](/categories/api)

redot/laravel-api-scaffold
==========================

Laravel API Scaffold

v1.0.0(2y ago)2101MITPHPPHP ^8.2

Since Jan 27Pushed 2y agoCompare

[ Source](https://github.com/redot-src/laravel-api-scaffold)[ Packagist](https://packagist.org/packages/redot/laravel-api-scaffold)[ RSS](/packages/redot-laravel-api-scaffold/feed)WikiDiscussions master Synced 1mo ago

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

Laravel API Scaffold
====================

[](#laravel-api-scaffold)

Welcome to the Laravel API Scaffold, a streamlined solution for establishing a consistent API structure within your Laravel application.

Installation
------------

[](#installation)

Begin by installing the package via Composer:

```
composer create-project --prefer-dist redot/laravel-api-scaffold
```

And voila! You're all set to proceed.

What's Included
---------------

[](#whats-included)

Our package provides essential components to kickstart your API development:

- [Laravel Sanctum](https://laravel.com/docs/sanctum): Enables API authentication.
- [Spatie Laravel Query Builder](https://github.com/spatie/laravel-query-builder): Facilitates filtering, sorting, and relationship inclusion.

Features
--------

[](#features)

Experience the following features tailored for your convenience:

- Robust authentication system supporting multiple guards for admins and users.
- Integration of a settings model for seamless application settings management.
- Handpicked utilities to expedite your development journey.

Directory Structure
-------------------

[](#directory-structure)

We strive to maintain Laravel's default directory structure with some enhancements.

### Routes

[](#routes)

As an API scaffold, we've made adjustments to the routes structure:

- `dashboard.php`: Houses dashboard routes, prefixed with `/dashboard`.
- `website.php`: Contains public website routes without any prefix.

### Controllers

[](#controllers)

Controllers are organized into two distinct directories:

- `Dashboard`: Dedicated to dashboard-related controllers.
- `Website`: Hosts controllers pertinent to the public website.

Each directory features a `Controller` class extending Laravel's default `Controller`, with additional functionalities.

#### `respond` Method

[](#respond-method)

Easily handle action success responses with the `respond` method, supporting named parameters in PHP 8.

```
public function index()
{
    return $this->respond(
        payload: ['foo' => 'bar'],
        message: 'This is a message',
        status: 200
    );
}
```

#### `fail` Method

[](#fail-method)

Effortlessly manage action failure responses using the `fail` method.

```
public function index()
{
    return $this->fail(
        message: 'This is a message',
        status: 400,
        payload: ['foo' => 'bar']
    );
}
```

### Requests

[](#requests)

Similarly, requests are categorized into `Dashboard` and `Website` directories for clarity.

Utilities
---------

[](#utilities)

Benefit from our bundled utilities designed to simplify your workflow.

### `CanUploadFile` Trait

[](#canuploadfile-trait)

This trait facilitates file uploading within your application, offering methods like `uploadFile` and `deleteFile`.

### `FirebaseNotify` Trait

[](#firebasenotify-trait)

Streamline user notifications via Firebase Cloud Messaging with the `notify` method.

### `Setting` Model

[](#setting-model)

The `Setting` model is your go-to solution for storing application settings, accessible via the `get` method or `setting` helper function.

```
// Access settings using the model
Setting::get('foo');

// Or via the helper function
setting('foo');
```

Enjoy seamless performance with automated settings caching.

---

Embrace Laravel API development with ease, thanks to our intuitive scaffold. Happy coding!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

834d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe62c6597d6411df01b9d1c769a0134d825b1462dc7bad4c2524d4150019a5a?d=identicon)[AbdelrhmanSaid](/maintainers/AbdelrhmanSaid)

---

Top Contributors

[![AbdelrhmanSaid](https://avatars.githubusercontent.com/u/70618755?v=4)](https://github.com/AbdelrhmanSaid "AbdelrhmanSaid (3 commits)")

---

Tags

apilaravelredotapilaravelscaffold

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/redot-laravel-api-scaffold/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[krayin/laravel-crm

Krayin CRM

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

UnoPim Laravel PIM

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

Aimeos headless ecommerce system

2.5k2.3k](/packages/aimeos-aimeos-headless)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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