定制 fida/pilot 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

fida/pilot

最新稳定版本:v1.0.3

Composer 安装命令:

composer require fida/pilot

包简介

Laravel CRUD Generator package

README 文档

README

Laravel PHP License Composer

Laravel CRUD Generator (Pilot) is a simple Laravel package that helps developers quickly configure an admin panel and generate a ready-to-use CRUD system.

This package installs via Composer and provides two Artisan commands that automatically configure an admin layout and generate a full CRUD module with AJAX functionality.

Installation

First create a new Laravel project:

laravel new my-project

Move into the project directory:

cd my-project

Install the package via Composer:

composer require fida/laravel-crud-generator

Available Commands

After installing the package, two Artisan commands will be available:

php artisan pilot:config
php artisan pilot:crud

AdminLTE Configuration

Run the following command:

php artisan pilot:config

This command configures AdminLTE v4 inside the Laravel project and creates the following files:

resources/views/layouts/app.blade.php
resources/views/layouts/partials/head.blade.php
resources/views/layouts/partials/header.blade.php
resources/views/layouts/partials/sidebar.blade.php
resources/views/layouts/partials/script.blade.php
resources/views/layouts/partials/footer.blade.php
public/assets/js/general.js

After these files are created, AdminLTE v4 will be fully configured and ready to use.

CRUD Generator

Run the CRUD generation command:

php artisan pilot:crud ModelName --columns="table_column_name:column_type:validation"

Separate the columns using commas as delimiters.

php artisan pilot:crud Product --columns="name:string:required|max:10,price:decimal:required|min:0,qty:integer:nullable"

This command generates the following files:

app/Http/Controllers/ProductController.php
app/Http/Requests/ProductRequest.php
app/Models/Product.php

database/migrations/2026_03_15_183116_create_products_table.php

public/assets/js/product.js

resources/views/pages/product/index.blade.php
resources/views/pages/product/create.blade.php
resources/views/pages/product/edit.blade.php
resources/views/pages/product/table.blade.php

It will also automatically create a products route inside the web.php file.

Example:

Route::resource('products', ProductController::class);

Database Migration

Run the migration command:

php artisan migrate

This will create the products table in your database.

Run Laravel Server

Start the Laravel development server:

php artisan serve

Now open your browser and go to:

http://localhost:8000/products

Your CRUD system is now fully functional.

Customizing the CRUD

You can add more columns to your table.

Step 1 — Update Migration

Add your required columns in the migration file.

Step 2 — Update Create Form

Add inputs inside:

resources/views/pages/create.blade.php

Step 3 — Frontend Validation

public/assets/js/product.js

Example validation:

$('#create-product-form').validate({

    rules: {
        product: { required: true },
        // more fields
    },

    submitHandler: (form) => {

    }

});

Step 4 — Backend Validation

Add validation rules inside:

app/Http/Requests/ProductRequest.php

Example validation:

public function rules(): array
{
    return [
        'product' => 'required|string|max:255',
    ];
}

Editing Records

To support editing functionality, update:

resources/views/pages/product/edit.blade.php

Add inputs and validation rules according to your requirements.

AJAX Based CRUD

The generated CRUD system works using AJAX requests, which provides:

  • Faster interaction
  • No page reload
  • Better user experience

Template Flexibility

Although this package configures AdminLTE v4, you can replace it with any other admin template based on your project needs.

License

This package is open-source and available under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固