Basic Crud Generator (With Code Files, like GII (YII2)) Using Laravel, Livewire and Tailwind CSS

Overview

LiveCrud

Packagist License Packagist Downloads Packagist Version

Live Crud Generator. This package generates Basic Crud with Livewire.

Features

  • Generate Complete Crud With Livewire Component and Blade Files
  • Create / Update / Delete Functional
  • Real Time Validation Already Added
  • Fuzzy Search Functional

Installation

Via Composer

composer require imritesh/livecrud

Prerequisites

  • Models should be in app/Models directory
  • Crud of only $fillable property will be generated
protected $fillable = ['name','username'];

Usage

php artisan crud:make Name_Of_Your_Model
  • This Command Will Generate Two Files
    • First Will be in app/HttpLivewire
    • Second Will be in resources/views/Livewire

For Bootstrap 4

  1. Publish config and change template = 'bootstrap'

  2. Please copy this script and paste in your layout just after @livewireScripts tag

<script type="text/javascript">
    window.livewire.on('showConfirmDelete', () => {
        $('#deleteModal').modal('show');
    });
    window.livewire.on('hideConfirmDelete', () => {
        $('#deleteModal').modal('hide');
    });
    window.livewire.on('showForm', () => {
                $('#showForm').modal('show');
            });
    window.livewire.on('hideForm', () => {
        $('#showForm').modal('hide');
    });
</script>

TODO

[x] Tailwind Support

[x] Bootstrap 4 & 5 Support

  • Bulma Support

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Comments
  • Localization

    Localization

    Thank you for sharing your useful package. I may help you adding localization. Are you interested in this feature?

    For example the end of lines 115 and 116 of /src/Commands/LiveCrudView.php:

    from ">Edit</a> ">Delete</a>

    replace with ">{{ __('Edit') }}</a> ">{{ __('Delete') }}</a>

    and then add the file /resources/lang/en.json containing: { "Edit": "Edit", "Delete": "Delete" }

    enhancement 
    opened by Mokei-it 2
  • Empty table doesn't show any message

    Empty table doesn't show any message

    Why don't use @forelse instead of @foreach so we can show a message like Not item found when the request has no result. I think it is more expressive than an empty' table

    opened by samankassou 1
  • Form after updating stays open

    Form after updating stays open

    Form after updating stays open

    I may be wrong, but it seems you forgot to close the form after updating the record and flashing the message.

    I mean in app\Http\Livewire\model.php

    public function update(){ .... session()->flash('message', 'Record Updated Succesfully'); $this->showForm = false; // I think you should add this line }` Thank you!

    opened by Mokei-it 1
  • Problems with models & fillable with '_'

    Problems with models & fillable with '_'

    I tried to install and work with this package and it throws a lot of errors.

    inside the model (services_relation.php) protected $fillable = ['am_cat_id','service_category'];

    Problem 1: The template wont work as its trying to render

    public function render()
        {
            $model = Model::where('am_cat_id', 'like', '%'.$this->search.'%')->orWhere('service_category', 'like', '%'.$this->search.'%')->latest()->paginate($this->paginate);
            return view('livewire.services-relation', [
                'rows'=> $model
            ]);
        }
    

    Which I fixed with

    public function render()
        {
            $model = Model::where('am_cat_id', 'like', '%'.$this->search.'%')->orWhere('service_category', 'like', '%'.$this->search.'%')->latest()->paginate($this->paginate);
            return view('livewire.services_relation', [
                'rows'=> $model
            ]);
        }
    
    opened by spooksie 4
  • Error running ide-helper

    Error running ide-helper

    Running ide-helper the following error is displayed :

    Too few arguments to function Illuminate\Console\GeneratorCommand::__construct(), 0 passed in /Users/pg/Sites/resresto/vendor/imritesh/livecrud/src/LiveCrudServiceProvider.php on line 35 and exactly 1 expected
    
      at vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php:107
        103▕      *
        104▕      * @param  \Illuminate\Filesystem\Filesystem  $files
        105▕      * @return void
        106▕      */
      ➜ 107▕     public function __construct(Filesystem $files)
        108▕     {
        109▕         parent::__construct();
        110▕ 
        111▕         $this->files = $files;
    
    opened by clickanidea 2
Releases(v2.3.1)
Owner
Ritesh Singh
Full Stack Developer
Ritesh Singh
Basic Crud operations using smarty and php

Smarty template engine Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Documentati

null 0 Aug 8, 2022
Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps !

?? CRUDBOOSTER - Laravel CRUD Generator Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps ! About CR

Crocodic Studio 1.7k Jan 8, 2023
React laravel starter kit with tailwind css and vite js(laravel 9)

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Jerald Tonmoy Dias 2 Dec 23, 2022
A Laravel dashboard front-end scaffolding preset for Tailwind CSS - Support RTL out of the box.

?? Laravel tailwind css dashboard preset A Laravel dashboard front-end scaffolding preset for Tailwind CSS - Support RTL out of the box. Usage Fresh i

Miaababikir 343 Dec 7, 2022
A Laravel 9, Vite, Svelte SPA, Tailwind CSS (w/ Forms Plugin & Aspect Ratio Plugin), Axios & TypeScript starter template.

Laravel 9 + Vite + Svelte + Tailwind CSS This starter template includes: Laravel 9 Vite Svelte Tailwind CSS (w/ @tailwindcss/forms and @tailwindcss/as

Ronnie 19 Dec 20, 2022
This package provides an artisan command to generate a basic crud with Restful API support

NHRROB Crud Generator Package This package provides an artisan command to generate a basic crud composer install command: composer require nhrrob/crud

Nazmul Hasan Robin 22 Jun 24, 2022
LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like Advanced CRUD Generation, Module Manager, Backups and many more.

LaraAdmin 1.0 LaraAdmin is a Open source CRM for quick-start Admin based applications with features like Advanced CRUD Generation, Schema Manager and

Dwij IT Solutions 1.5k Dec 29, 2022
A Laravel 8 and Vue 3 SPA boilerplate using tailwind styling and sanctum for authentication :ghost:

Laravel Vue Sanctum SPA Laravel and vue spa using tailwind (laravel/ui looks) for styling and sanctum for authentification Features Laravel 8 Vue + Vu

Hijen EL Khalifi 62 Dec 5, 2022
Simple mobile shop using basic php

simple-mobile-shop simple mobile shop using basic php Project Overview Go to your Xammp/wamp-server root folder Then create a folder named "mobileshop

IQBAL HASAN 2 Aug 9, 2022
:elephant: A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.

Laravel Vue Boilerplate A Laravel 6 Single Page Application boilerplate using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass and Pug with: A users

Alefe Souza 533 Jan 3, 2023
Until 2018, Backpack v3 used this Base package to offer admin authentication and a blank admin panel using AdminLTE. Backpack v4 no longer uses this package, they're now built-in - use Backpack/CRUD instead.

Note: This package is only used by Backpack v3. Starting with Backpack v4, everything this package does is included in Backpack/CRUD - one package to

Backpack for Laravel 845 Nov 29, 2022
A CRUD operation using php and Mysql database

This is a CRUD operation using php and Mysql database. In this when we add(CREATE) new user we need to submit add data in one form only in frontenf but in backend the data is storing in two different tables this is done using foreign key in Mysql.

Mohit Kumar 1 May 10, 2022
Initial template to start your awesome Laravel, Tailwind and Vue projects

Features Laravel 8.* Tailwind 2.1 Ready and Loaded @tailwindcss/typography @tailwindcss/forms Dark mode ready All variants enabled by default Vue 2, V

Marc Garcia Torrent 19 Jul 19, 2022
Clone do instagram utilizando Laravel, Vue, Inertia, Tailwind

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Bortolin Furlanetto 1 Jan 3, 2022
A Laravel-Vue-Tailwind SAAS Starter Kit.

Super SAAS Template My name is Julien Nahum, I've founded multiple Software-As-A-Service companies. This repo is the base I'm using to create a new SA

Julien Nahum 16 Dec 23, 2022
Starter - Laravel, Vue, Inertia, Tailwind, Vite

Starter - Laravel, Vue, Inertia, Tailwind, Vite Laravel-vite preset Laravel 9 Vue 3 Inertia Tailwind Vite Including Sail (Docker). php 8.1 mysql 8.0 p

Anatoliy 6 Dec 28, 2022
compile multiple tailwind.config.js with laravel-vite plugin

Compile multiple tailwind css from different tailwind.config.js files using laravel-vite If do you want to compile two or more tailwind css from diffe

Muhammad Amir 15 Dec 19, 2022
Laravel Framework 5 Bootstrap 3 Starter Site is a basic application with news, photo and video galeries.

Laravel Framework 5.1 Bootstrap 3 Starter Site Starter Site based on on Laravel 5.1 and Boostrap 3 Features Requirements How to install Application St

null 900 Dec 22, 2022
Basic calculator made in PHP, CSS3 and JavaScript.

Basic Calculator in PHP Basic calculator in PHP made for treining. ??‍?? Used Technology PHP HTML CSS JavaScript ?? License This project is under MIT

Maria Peixoto 3 Aug 24, 2021