Weave Code
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.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity