承接 fatihrizqon/laravel-service-repo-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fatihrizqon/laravel-service-repo-generator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require fatihrizqon/laravel-service-repo-generator

包简介

Artisan command to generate Service & Repository in Laravel

README 文档

README

An Artisan command to generate Service & Repository pattern in Laravel projects, complete with interfaces and customizable stubs.

✨ Features

  • Generate Service & Service Interface
  • Generate Repository & Repository Interface
  • Configurable namespaces
  • Customizable stubs via vendor:publish
  • Laravel auto-discovery support
  • Compatible with Laravel 10, 11, and 12

📦 Installation

Install the package via Composer:

composer require fatihrizqon/laravel-service-repo-generator

The service provider will be automatically registered via Laravel auto-discovery.

⚙️ Publish Configuration

(Optional but recommended)

php artisan vendor:publish --tag=service-repo-generator-config

The configuration file will be published to:

config/service-repo-generator.php

🧱 Publish Stubs (Customize Templates)

To customize the service and repository templates:

php artisan vendor:publish --tag=service-repo-generator-stubs

The stubs will be published to:

stubs/service-repo-generator/

🚀 Usage

Generate a Service

php artisan create:service User

This command will generate:

app/Services/UserService.php
app/Services/Interfaces/IUserService.php

Generate a Repository

php artisan create:repository User

This command will generate:

app/Repositories/UserRepository.php
app/Repositories/Interfaces/IUserRepository.php

🛠 Configuration Example

return [
    'service_namespace' => 'Services',
    'service_interface_namespace' => 'Services\\Interfaces',

    'repository_namespace' => 'Repositories',
    'repository_interface_namespace' => 'Repositories\\Interfaces',
];

📄 License

MIT License © 2025
Created by Fatih Rizqon

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固