|
1 |
| -# Hello VitePress |
| 1 | + |
| 2 | + |
| 3 | +# Laravel CRUD Generator |
| 4 | + |
| 5 | +[![Latest Version on Packagist][ico-version]][link-packagist] |
| 6 | +[![Total Downloads][ico-downloads]][link-downloads] |
| 7 | +[![Software License][ico-license]](LICENSE.md) |
| 8 | +[![Build Status][ico-circleci]][link-circleci] |
| 9 | +[![StyleCI][ico-styleci]][link-styleci] |
| 10 | + |
| 11 | +This package adds a **make:crud** commands to Artisan in |
| 12 | +your Laravel project. With this command you can generate a |
| 13 | +CRUD (Create, Read, Update, Delete) for any table in just |
| 14 | +one command. |
| 15 | + |
| 16 | +The generated CRUD includes a Controller, Model, Policy, |
| 17 | +routes, validations, and 4 view files (index, create, edit, |
| 18 | +show). It also supports relations between tables, so you can |
| 19 | +generate nested CRUDs, for example: generating CRUD for |
| 20 | +comments inside a blog post. |
| 21 | + |
| 22 | +The output is fully customizable and supports both Bootstrap |
| 23 | +5 and Tailwind CSS. |
| 24 | + |
| 25 | +## Table of Contents |
| 26 | + |
| 27 | +- [Demo video](#demo-video) |
| 28 | +- [Installation](#installation) |
| 29 | +- [Usage](#usage) |
| 30 | +- [Options](#options) |
| 31 | +- [Contributing](#contributing) |
| 32 | +- [License](#license) |
| 33 | + |
| 34 | +## Demo video |
| 35 | + |
| 36 | +[](http://www.youtube.com/watch?v=rjDX5ItsOnQ "Video Title") |
| 37 | + |
| 38 | +## Installation |
| 39 | + |
| 40 | +Via [composer](http://getcomposer.org): |
| 41 | + |
| 42 | +```bash |
| 43 | +$ composer require san-kumar/laravel-crud --dev |
| 44 | +``` |
| 45 | + |
| 46 | +After installing the package you should see a |
| 47 | +new `make:crud` command in your Artisan commands list. |
| 48 | + |
| 49 | +## Usage |
| 50 | + |
| 51 | +```bash |
| 52 | +# Create CRUD for authors table |
| 53 | +$ php artisan make:crud authors |
| 54 | + |
| 55 | +# Create CRUD for the authors > posts table |
| 56 | +$ php artisan make:crud authors.posts |
| 57 | + |
| 58 | +# Create CRUD for the authors > posts > comments table |
| 59 | +$ php artisan make:crud authors.posts.comments |
| 60 | +``` |
| 61 | + |
| 62 | +## Options |
| 63 | + |
| 64 | +### CSS Framework |
| 65 | + |
| 66 | +You can choose between Bootstrap 5 and Tailwind CSS. By |
| 67 | +default, Bootstrap 5 is used. |
| 68 | + |
| 69 | +```bash |
| 70 | +# Create CRUD for authors table using Tailwind CSS |
| 71 | +$ php artisan make:crud authors --css=tailwind |
| 72 | +``` |
| 73 | + |
| 74 | +### Layout |
| 75 | + |
| 76 | +By default, the generated views use the `layouts.app` |
| 77 | +layout. You can change this by passing the `--layout` |
| 78 | +option. |
| 79 | + |
| 80 | +```bash |
| 81 | +# Create CRUD for authors table using Tailwind CSS |
| 82 | +$ php artisan make:crud authors --layout=layouts.admin |
| 83 | +``` |
| 84 | + |
| 85 | +### Prefix |
| 86 | + |
| 87 | +You can add a prefix to the generated routes by passing the |
| 88 | +`--prefix` option. |
| 89 | + |
| 90 | +```bash |
| 91 | +# Create CRUD for authors table using Tailwind CSS |
| 92 | +$ php artisan make:crud authors --prefix=admin |
| 93 | +``` |
| 94 | + |
| 95 | +## Contributing |
| 96 | + |
| 97 | +All contributions (in the form on pull requests, issues and |
| 98 | +feature-requests) are welcome. See |
| 99 | +the [contributors page](../../graphs/contributors) for all |
| 100 | +contributors. |
| 101 | + |
| 102 | +## License |
| 103 | + |
| 104 | +`san-kumar/laravel-crud` is licenced under the MIT License ( |
| 105 | +MIT). Please see the [license file](LICENSE.md) for more |
| 106 | +information. |
| 107 | + |
| 108 | +[ico-version]: https://img.shields.io/packagist/v/san-kumar/laravel-crud.svg?style=flat-square |
| 109 | + |
| 110 | +[ico-license]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square |
| 111 | + |
| 112 | +[ico-downloads]: https://img.shields.io/packagist/dt/san-kumar/laravel-crud.svg?style=flat-square |
| 113 | + |
| 114 | +[ico-circleci]: https://img.shields.io/circleci/project/github/san-kumar/laravel-crud.svg?style=flat-square |
| 115 | + |
| 116 | +[ico-styleci]: https://styleci.io/repos/56054783/shield |
| 117 | + |
| 118 | +[link-packagist]: https://packagist.org/packages/san-kumar/laravel-crud |
| 119 | + |
| 120 | +[link-downloads]: https://packagist.org/packages/san-kumar/laravel-crud |
| 121 | + |
| 122 | +[link-circleci]: https://circleci.com/gh/san-kumar/laravel-crud |
| 123 | + |
| 124 | +[link-styleci]: https://styleci.io/repos/539648789 |
0 commit comments