Download the PHP package yassin-ahmed/laravel-api-crud-generator without Composer

On this page you can find all versions of the php package yassin-ahmed/laravel-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 laravel-api-crud-generator

Laravel API CRUD Generator

A powerful Laravel package that generates complete CRUD APIs with a single command. This package creates everything you need for a fully functional REST API including models, controllers, requests, resources, migrations, factories, seeders, tests, and routes.

๐Ÿš€ Features

๐Ÿ“ฆ Installation

Install the package via Composer:

Publish the package configuration (optional):

๐ŸŽฏ Quick Start

Generate a complete CRUD API with a single command:

This creates:

๐Ÿ“ Usage

Basic Usage

Command Options

Option Description Example
--fields Define model fields with types --fields="name:string,age:integer"
--relations Define model relationships --relations="belongsTo:User,hasMany:Post"
--force Overwrite existing files --force

Field Types

Type Description Validation Rule
string Short text (255 chars) string\|max:255
text Long text string
integer Whole numbers integer
boolean True/false values boolean
date Date values date
email Email addresses email
json JSON data json
decimal Decimal numbers numeric
float Floating point numbers numeric

Relationship Types

Type Description Example
belongsTo Many-to-one relationship belongsTo:User
hasMany One-to-many relationship hasMany:Comment

๐Ÿ“š Examples

E-commerce Product

Blog System

User Management

๐Ÿ”ง Generated Files Structure

After running the command, the following files are created:

๐ŸŒ API Endpoints

The generated controller provides these endpoints:

Method Endpoint Description
GET /api/your-models List all records (with pagination)
POST /api/your-models Create new record
GET /api/your-models/{id} Show specific record
PUT/PATCH /api/your-models/{id} Update record
DELETE /api/your-models/{id} Delete record

Query Parameters

Example API Calls

๐Ÿงช Testing

The package generates comprehensive feature tests. Run them with:

๐Ÿ”„ After Generation

  1. Run migrations:

  2. Register routes (if not using automatic discovery):

  3. Run seeders (optional):

  4. Customize as needed:
    • Update validation rules in request classes
    • Modify API resource fields
    • Add custom methods to controllers
    • Enhance factory definitions

โšก Advanced Features

Custom Validation

Update the generated request classes to add custom validation:

Custom API Resources

Enhance the generated resource classes:

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿ“ž Support

If you encounter any issues or have questions:

  1. Check the issues page
  2. Create a new issue if your problem isn't already reported
  3. Provide detailed information about your Laravel version and the command you used

๐Ÿ™ Credits

Created by Yassin


Made with โค๏ธ for the Laravel community


All versions of laravel-api-crud-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
laravel/framework Version ^10.0|^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 yassin-ahmed/laravel-api-crud-generator contains the following files

Loading the files please wait ...