Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Auto Api Laravel Package

fariddomat/auto-api

Laravel package that generates complete REST API modules via an interactive Artisan command: models, migrations, controllers, routes, and OpenAPI docs. Supports file uploads, pagination, soft deletes, searchable fields, and select-field relationships.

View on GitHub
Deep Wiki
Context7

Auto-API

Auto-API is a Laravel package that automates the generation of RESTful API endpoints for your models with a single interactive command. It creates models, migrations, controllers, routes, and OpenAPI specifications, supporting features like file uploads, pagination, soft deletes, searchable fields, and relationship data for select fields—all with a colorful CLI experience.


Installation

Install Auto-API via Composer:

composer require fariddomat/auto-api:dev-main

No additional setup is required—the package auto-registers its command via the service provider.

Usage

Generate an API Module

Use the interactive make:auto-api Artisan command to generate an API module:

php artisan make:auto-api

Interactive Example

    Welcome to AutoAPI Generator! Let's create your API step-by-step.
    Model name? (e.g., Post; must start with a capital letter): Product
    Define fields for Product (e.g., title:string, user_id:select). Leave blank to finish.
    Enter a field: name:string
    Enter a field: category_id:select
    Enter a field: image:image
    Enter a field: <Enter>
    API version? (e.g., v1, v2; default: v1): v1
    Enable soft deletes? (Default: No) [N/y]: y
    Enable search functionality? (Default: No) [N/y]: y
    Searchable fields (comma-separated, from: name, category_id, image): name
    Middleware (comma-separated, e.g., auth:api,throttle; leave blank for none): auth:api
    API Settings:
    Model: Product
    Fields: name:string, category_id:select, image:image
    Version: v1
    Soft Deletes: Yes
    Search Enabled: Yes
    Searchable Fields: name
    Middleware: auth:api
    Proceed with these settings? [Y/n]: <Enter>
    Generating Auto API for Product...
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style