Download the PHP package hexaora/api-crud-generator without Composer

On this page you can find all versions of the php package hexaora/api-crud-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-crud-generator

Hexaora API CRUD Generator

Latest Version on Packagist Total Downloads License

A Laravel CRUD generator that follows Clean Architecture principles with modular structure, API versioning, and comprehensive scaffolding. Generate complete CRUD operations with controllers, services, repositories, models, requests, resources, migrations, and routes in seconds.

Features

Requirements

Installation

You can install the package via Composer:

The package will automatically register the service provider.

Optionally, you can publish the stubs and config file:

Usage

Basic Usage

Generate a complete CRUD for a Product entity in a Catalog module:

This will generate:

Advanced Usage

Generate Everything at Once (New in v1.1.0)

The --all flag generates:

With Policy Authorization (New in v1.1.0)

Generates a policy class and auto-registers it in AuthServiceProvider. For Spatie permission integration, enable in config:

With Factory and Seeder (New in v1.1.0)

This generates:

With API Versioning

With Soft Deletes

Without Pagination

Complex Field Types

Available Field Types

Type Example Description
string name:string VARCHAR(255)
text description:text TEXT
integer quantity:integer INTEGER
boolean is_active:boolean BOOLEAN
decimal price:decimal:10,2 DECIMAL(10,2)
timestamp published_at:timestamp TIMESTAMP
date birth_date:date DATE
foreignId user_id:foreignId:cascade Foreign key with constraint

Field Modifiers

Command Options

Option Description Example
--module Module name (required) --module=Blog
--fields Comma-separated field definitions --fields="name:string,email:string"
--api-version API version --api-version=v1
--no-pagination Disable pagination --no-pagination
--softdeletes Add soft deletes --softdeletes
--policy Generate policy class ⭐ New --policy
--factory Generate factory class ⭐ New --factory
--seeder Generate seeder class ⭐ New --seeder
--all Generate everything (policy, factory, seeder) ⭐ New --all
--force Overwrite existing files --force

Post-Generation Setup

1. Run Migration

2. Bind Repository in Service Provider

Add to your app/Providers/AppServiceProvider.php:

3. Include Routes

Add to your main routes/api.php:

Or for versioned APIs:

4. Seed Test Data (Optional - v1.1.0+)

If you generated factories and seeders, run:

Generated File Structure

Global Files (v1.1.0+)

When using --factory or --seeder, these global files are auto-created and maintained:

Run all seeders with:

API Endpoints

The generated controller provides these endpoints:

Method URI Action Description
GET /api/module/entities index List all entities
POST /api/module/entities store Create new entity
GET /api/module/entities/{id} show Show specific entity
PUT/PATCH /api/module/entities/{id} update Update entity
DELETE /api/module/entities/{id} destroy Delete entity

For versioned APIs, the URI includes the version: /api/v1/module/entities

Examples

Complete E-commerce Product with Authorization (New in v1.1.0)

This generates everything including policy, factory, and seeder!

Blog System with Testing Data

User Management with Policies

Configuration

Publish the config file to customize behavior:

Available Configuration Options

Intelligent Factory Field Mapping (v1.1.0)

The factory generator intelligently maps fields to appropriate Faker methods:

Field Pattern Faker Method Example
email faker->unique()->safeEmail() [email protected]
phone faker->phoneNumber() (555) 123-4567
address faker->address() 123 Main St, City
url, website faker->url() https://example.com
image, photo faker->imageUrl() https://via.placeholder.com/640x480
title, name faker->words(3, true) Lorem Ipsum Dolor
description, content faker->paragraph() Long text...
decimal, price faker->randomFloat(2, 10, 1000) 523.45
boolean faker->boolean() true/false
date faker->date() 2024-01-15
foreignId RelatedModel::factory() Auto-creates relation

E-commerce Product Management

Blog System

User Management

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of api-crud-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
illuminate/filesystem Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hexaora/api-crud-generator contains the following files

Loading the files please wait ...