Download the PHP package mostafa-mohamed/laravel-crud without Composer

On this page you can find all versions of the php package mostafa-mohamed/laravel-crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-crud

Laravel CRUD Generator

laravel-crud-generator

Introduction

Build Status Coverage Status Latest Version on Packagist Total Downloads

Please see the full documentation here.

This package adds a crud:generate command to Artisan in your Laravel project. With this command you can generate CRUD (Create, Read, Update, Delete) for your db tables instantly!

The generated CRUD includes a Controller, Model, Policy, routes, validations, and 4 view files (index, create, edit, show). It also supports relations between tables, so you can generate nested CRUDs, for example: generating CRUD for comments inside a blog post.

The output is fully customizable and supports both Bootstrap 5 and Tailwind CSS.

Demo Video

Laravel crud generator package

Screenshots

Index page

Laravel-crud can generate nested CRUDs. For example, you can generate CRUD for customers > tickets > replies by simply running:

Table layout

Table index
(Automatically generated index page with responsive table layout)

The generated views are fully customizable and template based. For example, you can change the look of the index page by using different templates like table, cards or chat (included in the package).

Card layout

Card layout
(Card layout)

Chat layout

Chat layout
(Chat layout)

Create / Edit Forms

Laravel CRUD generator can automatically generate the FORM for creating and editing records. It can also generate the validation rules for the form.

Example of generated fields
(Example of generated fields)

Heads up!

The package is still in alpha

You should only use it with new projects. If you are using it in an existing project, make sure to back up (or commit) any project changes before running the command.

The aim of the CRUD generator is to save you time by generating common boilerplate CRUD code for any database table instantly.

But this code is not intended to be used as-is. You should always customize the generated code to fit your needs and manually review the generated files before deploying it to production.

Installation

Install with Composer

Via composer:

Generate files

Important!

Make sure to create the db tables and run migrations before starting the crud generator.

After installing the package you should see a new crud:generate command in your Artisan commands list.

To generate the Controller, Model, Policy, routes, etc use the following command:

Including the generated routes

By default, the generated routes are placed in the ./routes/crud/ directory. To include the generated routes just open your routes/web.php file and add the following line at the end of the file:

This will glob all the generated route files and include them in the routes/web.php file for you.

Alternatively, you can copy-paste the generated routes from the ./routes/crud/ directory to your routes/web.php file. This way you make any changes to the generated route code as per your needs.

Location of the generated files

The crud:generate command will generate the following files and place them in the appropriate directories:

By default, the generated code will not overwrite any existing files. If you want to overwrite the existing files, you can use the --force option.

Options

CSS Framework: Bootstrap 5, and TailwindCSS.

You can choose between Bootstrap 5 and Tailwind CSS or you can use your own CSS framework. By default, Bootstrap 5 is used when nothing is specified.

Prefix

You can add a route prefix for the generated CRUD by passing a --prefix option.

This will change the route from /authors to /admin/authors in all the generated files.

Index templates

You can choose between 3 ready-made index templates: table, cards and chat. By default, the table template is used.

Please see the index page here for screenshots.

Single create and edit form

In some cases, you may want to use a single form for both creating and editing a resource. You can do that by passing --merge-forms option.

This will generate a single view file called create-edit.blade.php and update the controller code accordingly so that it can be used for both creating and editing a resource.

Layout and section names

By default, the generated views use layouts/app.blade.php for layout and content for section name. You can change these default names by passing your own layout and section names.

Relational tables and nesting

In addition to generating simple CRUD for a single table, you can also generate CRUD for tables related to each other.

Example #1

For example, let's say we have the following tables:

To generate CRUD for these tables you can use the dot notation to specify the parent tables like this: authors.posts.comments.

bash

Create CRUD for authors table

$ php artisan crud:generate authors

Create CRUD for posts table

$ php artisan crud:generate authors.posts

Create CRUD for comments table

$ php artisan crud:generate authors.posts.comments bash

Create CRUD for posts table

$ php artisan crud:generate posts

Create CRUD for comments table

$ php artisan crud:generate posts.comments bash

Copy the template files into a new directory

$ php artisan crud:template newname bash

Copy the template files into a new directory

$ php artisan crud:template newname -d etc/templates bash

Generate the CRUD using the new template

$ php artisan crud:generate Post --template etc/templates/newname bash $ php artisan crud:remove customers.tickets.replies bash $ php artisan crud:remove customers.tickets.replies --backup=backup.zip



This too will remove the files from the disk but will also
create a Zip archive of all the removed files too.

# License

The software is licensed using a MIT License. It means you
can do whatever you want with it (including using it for
commercial purposes freely), as long as you include the
original copyright and license notice in any copy of the
software/source.

# Roadmap

- Add support for Livewire
- Add support for Laravel Jetstream

# About

**Found any bugs?** Report them on the [issue tracker](https://github.com/MOstafaMOhamedX/laravel-crud/issues).

**Want to contribute?** Fork the project on GitHub and send a
pull request.

**Like the project?** Star it on GitHub.

All versions of laravel-crud with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
doctrine/dbal Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mostafa-mohamed/laravel-crud contains the following files

Loading the files please wait ....