mahabub/laravel-crud-and-repository-generator

laravel crud generator with repository pattern
2,683 11
Install
composer require mahabub/laravel-crud-and-repository-generator
Latest Version:v3.1.0
PHP:^7.0 || ^7.1 || ^7.2 || ^7.3 || ^7.4|^8.0|^8.1|^8.2
License:MIT
Last Updated:Jun 7, 2023
Links: GitHub  ·  Packagist
Maintainer: mahabubul1

Laravel CRUD Generator with Repository Repository Pattern.

Installation

composer require mahabub/laravel-crud-and-repository-generator

Features

  • Controller
  • Model
  • Migration
  • Requests
  • Routes
  • Repository pattern
  • views

Configuration

Publish The Resources File
php artisan vendor:publish --tag=resources
Publish The Config File
php artisan vendor:publish --tag=crud-generator

Then go to config/crud-generator.php and configur laravel version

Usage

If what want to generate without folder. Just run the below command.

php artisan crud:make ModelName 

If what want to generate with Repository Patter without folder. Just run the below command.

php artisan crud:make ModelName --rep

If what want to generate in folder. Just run the below command.

php artisan crud:make FolderName/ModelName;

If what want to generate in folder with Repository Pattern. Just run the below command.

php artisan crud:make FolderName/ModelName --rep;

If what want to generate in folder without Repository Pattern. Just run the below command.

php artisan crud:make FolderName/ModelName ;

Usage Route In Web.php below Laravel 8

Route::resource('photos', 'PhotoController');

Or Route In Web.php for Laravel 8

Just Import The Class

Related Packages

torann/laravel-repository

Base repository implementation for Laravel

513,602 88
guosheng1987/laravel-repository-query

This package support a easy way to bind a parameter named `$filters` to your url...

18 0