Download the PHP package david-chamling/laravel-api-crud without Composer

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

Laravel API CRUD Generator – Fast, Flexible, and Extensible API Scaffolding

Laravel PHP GitHub Repo stars

A powerful Laravel package that generates complete CRUD API scaffolding with a single Artisan command.

πŸš€ Features

βœ… Requirements

πŸ“š Learn by Example

Want to see it in action? Check out this step-by-step guide where we build a complete Blog API using this package:

πŸ‘‰ Read the full step-by-step tutorial on Medium


πŸ“¦ Installation

Install via Composer:

(Optional) Publish stub files for customization:


⚑ Basic Usage

Generate full CRUD scaffolding for a model:

This will generate:

Define routes in your routes/api.php:

βœ… Note: The crudResource() macro is automatically registered by the package.


πŸ”’ Request Validation

For security and data integrity, you must define complete validation rules in your generated request classes.

⚠️ Important: This CRUD system only uses validated data. If you forget to define rules in your request classes, fields like name, price, etc., will be empty or missing from your controller β€” even if you pass them in the request.

Define validation rules in your generated request classes:


🧩 Model Configuration

Ensure your model’s $fillable property includes all the fields:


πŸ“˜ Generated Endpoints

Method Endpoint Description
GET /products Paginated list
GET /products/all Get all records
GET /products/count Count total items
GET /products/{id} Get single record
POST /products Create new record
PUT /products/{id} Update record
DELETE /products/{id} Delete record
GET /products/featured Custom endpoint

πŸ” Advanced Query Parameters

Customize search, filters, and pagination in your controller:

Examples:


πŸͺ Lifecycle Hooks

Override lifecycle hooks in your custom CRUD service:


πŸ” API Responses

Use the built-in response helper for consistency:


🧱 Customization

After publishing stubs, you can customize all generated files:

Modify these to fit your code style or architecture.


πŸ’‘ Example Controller


πŸ› οΈ Support

Having issues or suggestions? Open an issue on GitHub:

πŸ‘‰ GitHub Repository


πŸ“ License

MIT Licensed. See LICENSE.


🀝 Contributing

Pull requests and suggestions are welcome! Feel free to open issues for bugs or enhancements.


All versions of laravel-api-crud with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/framework Version ^9.0|^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 david-chamling/laravel-api-crud contains the following files

Loading the files please wait ....