naingminkhant/simple-crud

A Laravel package to auto-generate simple CRUD API (migration, model, controller, repository, route).

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/naingminkhant/simple-crud

v1.0.1 2025-06-28 10:57 UTC

This package is auto-updated.

Last update: 2025-11-28 11:50:38 UTC


README

A developer-friendly package to quickly scaffold CRUD operations in Laravel โ€” including models, migrations, controllers, repositories, routes, and views โ€” using a single Artisan command. It use my another package, (naingminkhant/myrepo) which handle CRUD operations, error handling, and logging,

๐Ÿš€ Features

  • โœ… Generate Eloquent Model and Migration
  • โœ… Generate Repository class
  • โœ… Generate API or MVC-style Controller
  • โœ… Append route to api.php or web.php
  • โœ… Generate empty Blade view files (index, create, edit, show)
  • โœ… Automatically add $guarded = [] to your model

๐Ÿ“ฆ Installation

Require the package via Composer:

composer require naingminkhant/simple-crud

๐Ÿงช Usage

For MVC

php artisan simple-crud {ModelName}

It will create model, migration, MVC style controller, repository, append routes in web.php, and generate basic view files.

For API

php artisan simple-crud {ModelName} --api

It will generate all CRUD endpoints for provided model.

Developers only need to provide columns for migration file and run

php artisan migrate

You can now try testing by calling endpoints.