sandipmahto/testcrud

Demo CRUD package for testing

Maintainers

Package info

github.com/sandip571/testcrud

pkg:composer/sandipmahto/testcrud

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2025-11-12 10:40 UTC

This package is auto-updated.

Last update: 2026-03-12 11:27:00 UTC


README

Package Name: sandipmahto/testcrud
Description: Demo CRUD package for testing in Laravel projects.
Author: Sandip Mahto
License: MIT

1️⃣ Introduction

TestCRUD is a fully functional CRUD package for Laravel.
It allows you to manage products with minimal setup.

Features:

  • Create, Read, Update, Delete products
  • Predefined routes, controller, model, and migrations
  • Optional config publishing

2️⃣ Requirements

  • PHP >= 8.0
  • Laravel >= 10.x (tested on Laravel 12.37.0)
  • Composer

3️⃣ Installation

Step 1: Install via Composer

composer require sandipmahto/testcrud


Step 2: Run Migrations
php artisan migrate


Step 3: Optional Config Publish
php artisan vendor:publish --provider="Sandipmahto\TestCrud\TestCrudServiceProvider" --tag=config


4️⃣ Package Structure
packages/sandipmahto/testcrud/
├── composer.json
├── LICENSE
├── README.md
├── src/
│   ├── TestCrudServiceProvider.php
│   ├── routes.php
│   ├── Models/
│   │   └── Product.php
│   └── Http/
│       └── Controllers/
│           └── ProductController.php
└── database/
    └── migrations/
        └── 2025_11_12_000000_create_products_table.php



Routes

All routes are prefixed with /testcrud:

Method	URI	Controller Method
GET	/testcrud/products	ProductController@index
POST	/testcrud/products	ProductController@store
GET	/testcrud/products/{id}	ProductController@show
PUT	/testcrud/products/{id}	ProductController@update
DELETE	/testcrud/products/{id}	ProductController@destroy


6️⃣ CRUD Usage Examples
GET All Products
GET /testcrud/products



POST /testcrud/products
Content-Type: application/json

{
  "name": "Demo Product",
  "price": 199.99,
  "description": "Testing"
}


{
  "id": 1,
  "name": "Demo Product",
  "price": "199.99",
  "description": "Testing",
  "created_at": "...",
  "updated_at": "..."
}