laravel-crud-generator

所属分类:后台框架
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2023-08-27 23:39:49
上 传 者sh-1993
说明:  欢迎使用Laravel原油发生器!此软件包提供了快速生成CRUD(创建、读取、更新、删除)的便捷方法...,
(Welcome to the Laravel CRUD Generator ?????! This package provides a convenient way to quickly generate CRUD (Create, Read, Update, Delete) functionality for your Laravel projects.)

文件列表:
composer.json (711, 2023-08-28)
composer.lock (571, 2023-08-28)
config/ (0, 2023-08-28)
config/crudconfig.php (140, 2023-08-28)
screenshots/ (0, 2023-08-28)
screenshots/post_form.png (60151, 2023-08-28)
screenshots/post_list.png (61455, 2023-08-28)
src/ (0, 2023-08-28)
src/CRUDGenerator.php (182, 2023-08-28)
src/CRUDGeneratorServiceProvider.php (683, 2023-08-28)
src/Console/ (0, 2023-08-28)
src/Console/Commands/ (0, 2023-08-28)
src/Console/Commands/CrudDeleteCommand.php (5348, 2023-08-28)
src/Console/Commands/CrudMakeCommand.php (12325, 2023-08-28)
src/Console/Commands/templates/ (0, 2023-08-28)
src/Console/Commands/templates/controller.txt (3653, 2023-08-28)
src/Console/Commands/templates/create.txt (1124, 2023-08-28)
src/Console/Commands/templates/edit.txt (1183, 2023-08-28)
src/Console/Commands/templates/index.txt (3414, 2023-08-28)
src/Console/Commands/templates/inputTypes/ (0, 2023-08-28)
src/Console/Commands/templates/inputTypes/email.txt (443, 2023-08-28)
src/Console/Commands/templates/inputTypes/file.txt (412, 2023-08-28)
src/Console/Commands/templates/inputTypes/input.txt (442, 2023-08-28)
src/Console/Commands/templates/inputTypes/number.txt (444, 2023-08-28)
src/Console/Commands/templates/inputTypes/textarea.txt (424, 2023-08-28)
src/Console/Commands/templates/migration.txt (617, 2023-08-28)
src/Console/Commands/templates/model.txt (154, 2023-08-28)
src/Console/Commands/templates/navigationitem.txt (203, 2023-08-28)
vendor/ (0, 2023-08-28)
vendor/autoload.php (771, 2023-08-28)
vendor/composer/ (0, 2023-08-28)
vendor/composer/ClassLoader.php (16378, 2023-08-28)
vendor/composer/InstalledVersions.php (16143, 2023-08-28)
vendor/composer/LICENSE (1070, 2023-08-28)
vendor/composer/autoload_classmap.php (222, 2023-08-28)
vendor/composer/autoload_namespaces.php (139, 2023-08-28)
vendor/composer/autoload_psr4.php (133, 2023-08-28)
vendor/composer/autoload_real.php (1087, 2023-08-28)
... ...

## Laravel CRUD Generator ## Introduction Welcome to the Laravel CRUD Generator ! This package provides a convenient way to quickly generate CRUD (Create, Read, Update, Delete) functionality for your Laravel projects. ## Installation To integrate the **Laravel CRUD Generator** into your Laravel project, follow these steps: 1. Open your terminal and navigate to your project's root directory. 2. Run the following command to install the package via Composer: ```bash composer require mehadi/laravel-crud-generator ``` ## Features The **Laravel CRUD Generator** offers the following features: * Automatically creates the Model, Migration, Controller, and View files for your CRUD operations. * Adds a menu item to the navigation for easy access to the generated CRUD pages. * Sets up the necessary routes in the `web.php` file. * On deletion, it removes all the files generated by the CRUD operations. * Input fields **`[text, textarea, email, number, file]`** * File uploading * Deleting old file when updating any model post * Simple Form validation ## Usage Once you've installed the package and set up the prerequisites, you can use the **Laravel CRUD Generator** to quickly create CRUD operations for your models. Here's how: 1. Open your terminal in the root directory of your Laravel project. 2. Use the following command to generate CRUD files for a specific model (e.g., `Post`) along with its columns: ```bash php artisan crud:make Post --data='title:string:input,description:text:textarea,image:text:file' ``` - The first parameter (`Post` in this example) is the name of the model. - The second parameter (`--data`) specifies the table columns for the model, where each column is defined as `column_name:data_type`. - Certainly, let's break down secound parameter (`--data='title:string:input,description:text:textarea,image:text:file'`): - `image`: This is the name of the column in the database table. It represents a field in the table where you'll store information related to images. - `text`: This is the data type assigned to the column in the database. In this case, it's set to "text," which indicates that the column can store a longer text-based content. - `file`: This refers to the input type that you would use in the user interface (UI) for uploading files. In the context of HTML forms, this would be an `` element with `type="file"`. This allows users to select and upload files, such as images, from their devices. 3. After creating a new Model, be sure to execute the following command: ```bash php artisan migrate ``` Running this command is important to ensure that any database changes related to the new Model are properly applied. This helps keep your database schema synchronized with your application's data structure. 4. To delete all the generated CRUD files and clean up, use the following command: ```bash php artisan crud:delete Post ``` 5. To make these uploaded files accessible from the web, you need to create a symbolic link from the public/storage directory to the storage/app/public directory. This can be done using the following Artisan command: ```bash php artisan storage:link ``` After running this command, Laravel will create a symbolic link that allows files in the **storage/app/public** directory to be accessed through the URL http://your-app-url/storage. ## Prerequisites Before using the **Laravel CRUD Generator**, make sure you have the following prerequisites set up in your project: 1. Install Laravel Breeze package: ```bash composer require laravel/breeze ``` 2. Run the Breeze installation command and choose the Blade template option: ```bash php artisan breeze:install ``` 3. Run the migration command to set up the database tables: ```bash php artisan migrate ``` 4. Install npm packages: ```bash npm install ``` 5. Compile the assets with the following command: ```bash npm run dev ``` ## Screenshots ###### Add new Post form ![View Post Modal](https://github.com/screenshots/post_form.png) ###### List Post ![Add Post Modal](https://github.com/screenshots/post_list.png) ## Notes - This package helps automate the process of generating CRUD operations for your Laravel models, saving you time and effort. - Ensure that you have all the prerequisites installed and set up correctly before using the CRUD generator. For more information, visit the [GitHub repository](https://github.comhttps://github.com/mehadi/laravel-crud-generator) or the [Packagist page](https://github.comhttps://packagist.org/packages/mehadi/laravel-crud-generator) of the package.

近期下载者

相关文件


收藏者