承接 myopensoft/filament-crud-generator 相关项目开发

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

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

myopensoft/filament-crud-generator

最新稳定版本:1.0.5

Composer 安装命令:

composer require myopensoft/filament-crud-generator

包简介

to be use by ost's filament project

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package that provides a command to generate Livewire components with CRUD operations. This package simplifies the process of creating Livewire components, models, controllers, and related files for your Laravel application.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require myopensoft/filament-crud-generator

You can publish the config file with:

php artisan vendor:publish --tag="filament-crud-generator-config"

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-crud-generator-views"

Usage

After installing the package, you can use the make:filament-resource command to generate a new set of Livewire components with CRUD operations:

php artisan make:filament-resource Post

This will create a new set of Livewire components for the Post model with all the necessary files for CRUD operations, including a controller and Blade views.

Options

The command supports the following options:

  • -m, --model: Create a model for the resource
  • -s, --soft-deletes: Add soft delete functionality to the model
  • -f, --force: Overwrite existing files
  • -t, --table: Specify a custom table name (default: pluralized snake_case of resource name)

Examples

Create a resource with a model:

php artisan make:filament-resource Post --model

Create a resource with a model that supports soft deletes:

php artisan make:filament-resource Post --model --soft-deletes

Force overwrite existing files:

php artisan make:filament-resource Post --force

Create a resource with a custom table name:

php artisan make:filament-resource Post --model --table=custom_posts

Configuration

You can publish the configuration file to customize the behavior of the generator:

php artisan vendor:publish --tag="filament-crud-generator-config"

This will create a filament-crud-generator.php file in your config directory where you can customize the namespaces, templates, and default options for the generator.

Generated Files

The command generates the following files:

  1. Model (optional): A basic Eloquent model with fillable attributes and table name.
  2. Livewire Components:
    • Index component for listing records with search and pagination
    • Create component for adding new records
    • Edit component for updating existing records
  3. Blade Views: Corresponding views for each Livewire component with responsive UI.
  4. Controller: A controller with an index method that includes permission checking and returns a view.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固