PHPackages                             sqits/laravel-api-skeleton - 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. sqits/laravel-api-skeleton

ActiveLibrary[API Development](/categories/api)

sqits/laravel-api-skeleton
==========================

Package to create a complete Laravel API resource according to stub files.

0.0.7(7y ago)2106MITPHPPHP ^7.1

Since Sep 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sqits/laravel-api-skeleton)[ Packagist](https://packagist.org/packages/sqits/laravel-api-skeleton)[ Docs](https://github.com/sqits/laravel-api-skeleton)[ RSS](/packages/sqits-laravel-api-skeleton/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (9)Used By (0)

Package to create api skeletons with artisan
============================================

[](#package-to-create-api-skeletons-with-artisan)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1ffccb31b2dc9633b5503415fd4ea82a01e9a63fb005ab492b903599387a6247/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73716974732f6c61726176656c2d6170692d736b656c65746f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sqits/laravel-api-skeleton)[![StyleCI](https://camo.githubusercontent.com/7420bc3f628443ce4d3140822c1fccf9dbf45f0867363a37ae9ea87901720bf7/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3134373637363534322f736869656c64)](https://styleci.io/repos/147676542)[![Total Downloads](https://camo.githubusercontent.com/51983ddf4a212c711212dee79c8f447bb2450ac430f3acd4bb1eaa3c192c63a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73716974732f6c61726176656c2d6170692d736b656c65746f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sqits/laravel-api-skeleton)

This Laravel package creates an artisan command to generate an api skeleton.

```
php artisan make:apiskeleton
```

Artisan will ask 2 questions to define in which namespace and which name your skeleton should use

```
What is the namespace for the skeleton? [ApiSkeleton]
> Foo/Bar

What is the name for the skeleton? [ApiSkeleton}
> Hat
```

After the command the following files are created (may be different according to your config)

```
app
└───Http
    └───Controllers
    │   └───Foo
    │       └───Bar
    │           |   HatController.php
    └───Requests
    │   └───Foo
    │       └───Bar
    │           |   StoreHatRequest.php
    │           |   UpdateHatRequest.php
    └───Resources
    │   └───Foo
    │       └───Bar
    │           |   Hat.php
    │           |   HatCollection.php
    Hat.php

database
└───factories
│   └───Foo
│       └───Bar
│           |   HatFactory.php
└───migrations
│   |   xxxx_xx_xx_xxxxxx_create_hats_table.php
└───seeds
    └───Foo
        └───Bar
            |   HatTestSeeder.php

tests
└───Feature
    └───Foo
        └───Bar
            |   HatDestroyTest.php
            |   HatIndexTest.php
            |   HatShowTest.php
            |   HatStoreTest.php
            |   HatUpdateTest.php

```

Installation and usage
----------------------

[](#installation-and-usage)

This package requires PHP 7.1 and Laravel 5.6 or higher. Install the package by running the following command in your console;

```
composer require sqits/laravel-api-skeleton
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Sqits\ApiSkeleton\ApiSkeletonServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [

    'files' => [

        /*
         * Define if the model should be created when a new API skeleton is created.
         */

        'models' => true,

        /*
         * Define if the migration for the model should be created when a new API skeleton is created.
         * The models should be set to true for the migrations to be created.
         */

        'migrations' => true,

        /*
         * Define if the controller should be created when a new API skeleton is created.
         * When the model is created also, the model would be used automatically in the controller.
         */

        'controllers' => true,

        /*
         * Define if the requests should be created when a new API skeleton is created.
         * The following requests will be made StoreModelRequest and UpdateModelRequest
         */

        'requests' => true,

        /*
         * Define if the resources should be created when a new API skeleton is created.
         * The following resources will be made Model and ModelCollection.
         */

        'resources' => true,

        /*
         * Define if the tests should be created when a new API skeleton is created.
         * The following tests will be made ModelIndexText, ModelShowTest, ModelStoreTest,
         * ModelUpdateTest and ModelDestroyTest.
         *
         * Value should be true for creating the tests inside the Feature folder. set
         * the value to 'unit' to create the tests inside the Unit folder.
         */

        'tests' => true,

        /*
         * Define if the seeders should be created when a new API skeleton is created.
         */

        'seeders' => [

            /*
             * Define if the default seeder for the model should be created when a new
             * API skeleton is created.
             */

            'defaults' => false,

            /*
             * Define if the test seeder for the model should be created when a new
             * API skeleton is created.
             */

            'tests' => true,

        ],

        /*
         * Define if the factories should be created when a new API skeleton is created.
         * The following resources will be made Model and ModelCollection.
         */

        'factories' => true,

        /*
         * Define if the services should be created when a new API skeleton is created.
         * You should define a folder in the config where the service should be located.
         *
         * If this option is set to true, artisan will ask the user to confirm the generation
         * of the service to make it optional per skeleton. If you want to skip the question
         * your should add --service to the make:apiskeleton command.
         */

        'services' => false,

        /*
         * Define if the repositories should be created when a new API skeleton is created.
         * You should define a folder in the config where the repository should be located.
         *
         * If this option is set to true, artisan will ask the user to confirm the generation
         * of the factory to make it optional per skeleton. If you want to skip the question
         * your should add --repository to the make:apiskeleton command.
         */

        'repositories' => false,

    ],

    'folders' => [

        /*
         * When creating the models, the models will be placed directly in the app folder
         * without a specific namespace. If you are using your own folder, please provide
         * the name of the folder. The model will be placed inside this folder with the
         * given namespace.
         */

        'models' => null,

        /*
         * When creating the services, the services will be placed inside the given
         * folder which will be placed inside the app folder of your application.
         */

        'services' => 'Services',

        /*
         * When creating the repositories, the repositories will be placed inside the given
         * folder which will be placed inside the app folder of your application.
         */

        'repositories' => 'Repositories',

    ],

    /*
     * By default the resource collection will append `Collection` to the name. If you would
     * like to have the name of the collection pluralized set this option to true.
     */

    'use_pluralized_collections' => false,
];
```

You can publish the stub files with:

```
php artisan vendor:publish --provider="Sqits\ApiSkeleton\ApiSkeletonServiceProvider" --tag="stubs"
```

The stub files are placed inside your resources folder and will contain:

```
resources
└───stubs
    └───apiskeleton
        |   service.stub
        |   repository.stub
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security-related issues, please [email](mailto:info@sqits.nl) to  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sqits](https://github.com/sqits)
- [Ruud Schaaphuizen](https://github.com/rschaaphuizen)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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 ~36 days

Recently: every ~54 days

Total

7

Last Release

2584d ago

### Community

Maintainers

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

---

Tags

apilaravelartisanresourcecrudSkeleton

### Embed Badge

![Health badge](/badges/sqits-laravel-api-skeleton/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M111](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[joskolenberg/laravel-jory

Create a flexible API for your Laravel application using json based queries.

4513.5k](/packages/joskolenberg-laravel-jory)

PHPackages © 2026

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