sobhan-aali/laravel-repo-controller-generator

Generate controller, repository and request files.

v1.0.0 2025-06-17 13:37 UTC

This package is auto-updated.

Last update: 2025-06-17 13:38:29 UTC


README

A simple Laravel package to generate CRUD Controllers along with Repository and Request classes.

👋 Introduction

Hi, I'm Sobhan Aali — thank you for choosing this package!

This tool helps you quickly scaffold a full set of files for a CRUD resource in your Laravel project, including:

  • ✅ CRUD Controller

  • ✅ Repository

  • ✅ Form Requests for store and update

📦 Before You Start

Before running the command, make sure to publish the stub files that the generator uses as templates:

php artisan vendor:publish --tag=repo-controller-stubs

Also, don't forget to create and use a base model with the required trait:

use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}

🚀 Usage

To generate a full CRUD setup for a resource, run the following command:

php artisan make:repo-controller Api/V1/Admin/CRUD/PostController