Download the PHP package mehedi8gb/api-crudify without Composer

On this page you can find all versions of the php package mehedi8gb/api-crudify. 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-crudify

Api Crudify

Laravel API Engine for Scalable Query-Driven Applications

Latest Version on Packagist Total Downloads License

Api Crudify is a professional-grade Laravel package that automates generation of robust, scalable, and standardized API CRUD components. It enforces the Service-Repository design pattern and implements a Chain of Responsibility pipeline for complex API queries — filtering, sorting, relation loading, soft deletes, and pagination — all driven by query parameters.


🚀 Key Features


📦 Installation

Run the installer to bootstrap all base classes and configure autoloading:

This command will:


🛠 Usage

Examples


📂 Generated Components

Component Path
Controller app/Http/Controllers/{Path}/{Name}Controller.php
Model app/Models/{Path}/{Name}.php
Service app/Services/{Path}/{Name}Service.php
Repository app/Repositories/{Path}/{Name}Repository.php
Form Requests app/Http/Requests/{Path}/{Name}StoreRequest.php & UpdateRequest.php
Resource app/Http/Resources/{Path}/{Name}Resource.php
Migration database/migrations/YYYY_MM_DD_create_{names}_table.php
Factory database/factories/{Path}/{Name}Factory.php
Seeder database/seeders/{Path}/{Name}Seeder.php
Feature Test tests/Feature/{Path}/{Name}Test.php

🏗 Architecture Overview

Every generated CRUD follows a strict 3-layer architecture:

Real-World Example

Controller — HTTP only, no business logic:

Service — orchestrates business logic:

Repository — data access only:


⚡ Query Pipeline — Chain of Responsibility

Every API request through handleApiQueryRequest() passes through this ordered pipeline:


🔍 Query Parameter Reference

Filtering

Parameter Description Example
?q= Frontend-friendly shorthand filter ?q=title=phone
?where= Direct column filter ?where=status,active
?orWhere= OR column filter ?orWhere=type,admin
?operator= Comparison operator ?operator== or ?operator=like
?exclude= Exclude a specific value ?exclude=status,deleted

Relation filtering via ?where=:

Frontend shorthand ?q= with pipe-separated conditions:

Complex nested relational query conditions:

?or=true converts multiple ?q= conditions to orWhere:


Sorting

Parameter Default Example
?sortBy= created_at ?sortBy=price
?sortOrder= desc ?sortOrder=asc

Safe against SQL injection — column existence is verified against the schema before applying. Skipped if the builder already has an orderBy applied.


Soft Deletes

Parameter Behaviour
?trashed=with Include soft-deleted records
?trashed=only Return only soft-deleted records
(omitted) Exclude soft-deleted records (default)

Pagination

Parameter Default Description
?page= 1 Current page
?limit= 10 Records per page
?limit=all Returns all records, no pagination

Response structure:


Relation Loading

Relations are resolved in this priority order:

  1. Explicit $with array passed to handleApiQueryRequest()
  2. Model-level $with property
  3. Eloquent registered eager loads via getEagerLoads()

🧰 Helper Functions

Global utility functions available after install:

Function Description
sendSuccessResponse($message, $data, $status) Standardized JSON success response
sendErrorResponse($exception, $status) Standardized JSON error response with environment-aware detail
validationException($payload, $key) Throw a ValidationException from array or string
filterPayload($data, $allowedKeys) Keep only allowed keys from an array
cacheQuery($query, $method, $args, $ttl) Execute and cache a query with tag-based invalidation
generateCacheKey($builder, $request, $tenantId) Generate deterministic cache key from query state
getCreatedAtColumn($builder\|$model) Resolve model's CREATED_AT column safely
getResourceClass($model) Auto-resolve {Model}Resource class or fallback to DefaultResource
deepMerge($original, $new) Deep array merge with force-replace support
processNestedArray($existing, $payload) Merge and deduplicate nested arrays by id
convertStatus($status) Convert boolean to 1/0
generateUniqueNumber($prefix) Generate a unique prefixed identifier
getFormatedDate($carbon) Human-readable date with diff: "2 days ago (14th April at 08:21 AM in 2025)"

⚙️ Base Classes Installed

After crudify:install, the following are placed in your app/ directory:


📜 Changelog

Please see CHANGELOG for recent changes.

✨ Credits

📜 License

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


All versions of api-crudify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version 12.*
andreaselia/laravel-api-to-postman Version ^2.1.0
cviebrock/eloquent-sluggable Version ^12.0.0
spatie/laravel-package-tools Version ^1.16.4
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 mehedi8gb/api-crudify contains the following files

Loading the files please wait ...