Laravel Package to generate CRUD Files using TALL Stack

Overview

tall-crud-generator

Laravel Package to generate CRUD Files using TALL Stack

Requirements

Make sure that Livewire is installed properly on your project.

Make sure that TailwindCSS is installed properly on your project.

Make sure that AlpineJS is installed properly on your project.

Installation

You can install the Package using Composer

composer require ascsoftw/tall-crud-generator

Usage

After you have installed the package, navigate to Config Page at URL /tall-crud-generator. Once there Select your Model and Select all the Features. Just submit the Form and you will be provided with a Livewire Component that you can include in any View where you to display the CRUD Functionality.

Recommended way of Installation

Although Config Page is displayed at URL /tall-crud-generator and is also configurable. It is recommended that you disable the Route from the Config File and in order to have better control you can display the Config Page by including the Livewire Component in any View.

@livewire('tall-crud-generator')

This way you can display the Config Page using your Application Layout and can also control the Users who have access to the Page.

Configurations

If you want to override the configurations, you can publish the config file using below command

php artisan vendor:publish --provider="Ascsoftw\TallCrudGenerator\TallCrudGeneratorServiceProvider" --tag=config

This will publish the configuration file at config/livewire-toast.php. You can override any configurations.

Name Type Default Description
route String /tall-crud-generator URL where the Config Page will be shown in your project
disable_route Boolean false Flag to disable the config page

You can also publish the View and Blade Components used using the below command

php artisan vendor:publish --provider="Ascsoftw\TallCrudGenerator\TallCrudGeneratorServiceProvider" --tag=views

This will publish the Views in resources/views/vendor/tall-crud-generator directory which you can then customize. Most of the Components being used are taken from Breeze and Jetstream Packages and so should be familiar.

FAQ

Question: There are many CRUD Packages available. Why use this Package?

Answer: Unlike other Packages, this Package works by generateing the actual Livewire Component. You are free to use it anywhere in your Project. It is also easier to customize them since you are editing the Livewire Files rather than figuring out the Configurable Options of the Package.

Q: Package doesn't support a Feaure that I need. What should I do?

A: The Package is at the initial stages and it only supports small number of Features. We are working on adding New Features. However, since the package generates the Actual Files, you can always Edit those Files and customize them according to your needs.

Features

Following Features are supported:

  • Pagination
  • Sorting
  • Searching
  • Modal Add
  • Modal Edit
  • Modal Delete
  • Validations
  • Form Field Type

Roadmap

Following Features are in the piepline:

  • Support Model Relations
  • Flash Messages
  • Select Dropdown from Related Field

Troubleshooting

Your Output don't get styles while using TailwindCss? Please publish your view. Therefore Laravel Mix compiler will find package related views and will purge CSS accordingly.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Credits

License

MIT

Comments
  • Wired Issue

    Wired Issue

    I am getting errors after installing this package. I can't login. I've published config and views but also same issue arise. Help needed for error provided below: Thank you in advance.

    InvalidArgumentException
    Unable to locate class or view [tall-crud-generator::label] for component [label].
    

    using Breeze,Tailwind,Livewire,Alpine !

    opened by audvik 5
  • How to Handle The `Select Fields` Step Issue

    How to Handle The `Select Fields` Step Issue

    I have installed this awesome package and I have run composer require laravel/ui command, then php artisan ui bootstrap --auth also

    and I have followed the package steps, BUT in the Select Fields step as shown here {CF2FC43A-12A8-41D9-B339-DB13C9816755}

    this issue triggered when I click NEXT {5FC1A363-7BF9-4323-A9A2-EB10581DA970}

    How I can solve this issue?

    bug 
    opened by mahmoudmohamedramadan 3
  •  EmitTo with

    EmitTo with "Camel Cased", on refresh's, blocking update when Create, Update and/or Remove.

    @locopine

    Generated Code for Component with CamelCased Name like LaravelTips has been fixed in the latest release.

    @ascsoftw

    Great job! What I reported has indeed been corrected and is perfect.

    By an oversight, when reporting on the last issue issue 9#, I ended up not reporting, also, that the same behavior happens in "$this->emitTo('LaravelTips', 'refrefh');". This causes the "index" not to update!

    I corrected it, in my tests, as follows:

    From

    • $this->emitTo('LaravelTips', 'refrefh'); To
    • $this->emitTo('laravel-tips', 'refrefh');

    In this way it worked well.

    Thx.

    opened by locopine 2
  • Livewire\Exceptions\ComponentNotFoundException Unable to find component: [ComponentName-child]

    Livewire\Exceptions\ComponentNotFoundException Unable to find component: [ComponentName-child]

    My congratulations on the excellent application! Great job!

    I leave here my report regarding the "difficulties" I faced with the last release:

    After generating a CRUD with the application I encountered the following situation:

    • In the main view with the generated directive as below: @livewire('LaravelTips')

    • And in the child view with the generated directive as below: @livewire('LaravelTips-child') @livewire('livewire-toast')

    • However, when accessing the CRUD, an exception was thrown:

    Livewire\Exceptions\ComponentNotFoundException Unable to find component: [LaravelTips] and; Livewire\Exceptions\ComponentNotFoundException Unable to find component: [LaravelTips-child] respectively.

    • In my case, it worked by being corrected to: @livewire('LaravelTips') and child to @livewire('laravel-tips-child') @livewire('livewire-toast')

    Another thing I noticed was that, apparently, the LIVEWIRE components, are being generated during the CRUD steps and, at the end when being named the component does not finish the CRUD generation under the claim that the name is already in use!

    Thx.

    opened by locopine 2
  • Undefined index: belongsToMany (View: /Users/project/vendor/ascsoftw/tall-crud-generator/resources/views/livewire/step4.blade.php)

    Undefined index: belongsToMany (View: /Users/project/vendor/ascsoftw/tall-crud-generator/resources/views/livewire/step4.blade.php)

    Undefined index: belongsToMany (View: /Users/project/vendor/ascsoftw/tall-crud-generator/resources/views/livewire/step4.blade.php)

    <x:tall-crud-generator::dialog-modal wire:model="confirmingBelongsToMany">

    <x-slot name="title">
    
        Add a Belongs to Many Relationship
    
    </x-slot>
    
    
    <x-slot name="content">
    
        <div class="mt-4">
    
            <div>
    
                <x:tall-crud-generator::label>Select Relationship</x:tall-crud-generator::label>
    
                <x:tall-crud-generator::select class="block mt-1 w-1/2" wire:model.lazy="belongsToManyRelation.name">
    
                    <option value="">-Please Select-</option>
    
                    @foreach($allRelations['belongsToMany'] as $c)
    
                    <option value="{{$c['name']}}">{{$c['name']}}</option>
    
                    @endforeach
    
                </x:tall-crud-generator::select>
    
                @error('belongsToManyRelation.name') <x:tall-crud-generator::error-message>{{$message}}</x:tall-crud-generator::error-message> @enderror
    
            </div>
    
    opened by vivekaris 1
  • Issues with prefixed tables

    Issues with prefixed tables

    First - Awesome Tool! This is 'exactly' what I needed to get started with and Laravel Livewire Datatables. This applies to v2.4.0. Issue - This didn't automatically take into account the table name changes for tables with a prefix. I had a suggestion that might be good to incorporate? Try/catch block of tallCrudGenerator.php -> method checkModel try { $model = new $this->modelPath(); $this->modelProps['tableName'] = Schema::connection( $model->getConnectionName() )->getConnection()->getTablePrefix() . $model->getTable(); $this->modelProps['primaryKey'] = $model->getKeyName(); $this->modelProps['columns'] = $this->getColumns(Schema::connection( $model->getConnectionName() )->getColumnListing( $model->getTable() ), $this->modelProps['primaryKey']); } catch (Exception $e) { $this->addError('modelPath', 'Not a Valid Model Class.'); return; }

    Additionally - I love all of the options, but I found for myself that it was speedier to delete/uncheck or change things once I knew what was possible, other than the other way around, so a couple nice-to-haves or optional or maybe someone might find useful?

    modifications:

    tallCrudGenerator.php ->
    
        public $primaryKeyProps = [
            'inList' => true,
            'label' => 'ID',
            'sortable' => true,
        ];
    
        public function addField($column = '')
        {
            $this->fields[] = [
                'column' => $column,
                'label' => ucwords(implode(" ",explode("_",$column))),
                'sortable' => true,
                'searchable' => true,
                'inList' => true,
                'inAdd' => true,
                'inEdit' => true,
                'fieldAttributes' => [
                    'rules' => '',
                    'type' => 'input',
                    'options' => '{"1" : "Yes", "0": "No"}',
                ],
            ];
            $this->resetValidation('fields');
        }
        public function getAdvancedSettingLabel($key)
        {
            //Str::replace does not exist in pre v8.41.0
            return Str::title(str_replace(['-','_'], [' ',' '], Str::kebab($key)));
        }
    
    opened by wacheson 0
  • More configuration necessary

    More configuration necessary

    Hi, Your generator is fun. While can override some styles, it would be fun to have better control concerning the styling. For example, your table stub has "text-xs" style in it, which is too small for my liking, or the blue style has to be changed in several fields. While it's ok to override one model, It can be cumbersome and subject to errors to change this on several models.

    Keep up your good work!

    opened by GuyVervilleSpiria 0
Releases(v2.4.0)
Owner
AscSoftwares
Web Development Agency
AscSoftwares
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.

TALL-stack form generator Laravel Livewire, Tailwind forms with auto-generated views. Support Contributions Features This is not an admin panel genera

TinaH 622 Jan 2, 2023
Automated Laravel TALL-stack installation with superpowers.

Easy command to install the TALL-stack & jumpstart development ?? This package provides a simple artisan command for Laravel that can fully scaffold y

Ralph J. Smit 38 Dec 3, 2022
Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack

Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack (Tailwind CSS, Alpine.JS, Laravel and Livewire).

CodeSPB 18 Jul 27, 2022
Gallium is a TALL stack starter kit offering a robust set of options enabling you to get up and running in a snap.

Very short description of the package This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention o

null 1 Nov 20, 2021
A collection of tools for rapidly building beautiful TALL stack interfaces, designed for humans.

Filament is a collection of tools for rapidly building beautiful TALL stack interfaces, designed for humans. Packages Admin Panel • Documentation • De

Filament 5.4k Jan 4, 2023
Source for "Getting Started with TALL stack" post

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

Kim Hallberg 2 Sep 16, 2022
A laravel package to generate class files from stub files.

Laravel Stub Generator A php laravel package to generate useable php files from given stub files . Installation Require the package using composer: co

Touhidur Rahman 31 Dec 29, 2022
A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel

Laravel TALL Preset A front-end preset for Laravel to scaffold an application using the TALL stack, jumpstarting your application's development. If yo

Laravel Frontend Presets 1.8k Jan 7, 2023
A TALL-based Laravel Livewire component to replace the (multiple) select HTML input form with beautiful cards.

TALL multiselect cards A TALL-based Laravel Livewire component to replace the (multiple) select HTML input form with beautiful cards. Table of content

Frederic Habich 19 Dec 14, 2022
Laravel generator with GUI. Generate crud / scaffold.

Laravel generator with GUI. Generate crud / scaffold.

George 420 Dec 5, 2022
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.

bastinald/ux Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire. Features Automatic migrations Automatic routing Automatic passwo

null 33 Nov 26, 2022
A Laravel package that allows you to use multiple ".env" files in a precedent manner. Use ".env" files per domain (multi-tentant)!

Laravel Multi ENVs Use multiple .envs files and have a chain of precedence for the environment variables in these different .envs files. Use the .env

Allyson Silva 48 Dec 29, 2022
Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Jameson Lopp 28 Dec 19, 2022
Generate trends for your models. Easily generate charts or reports.

Laravel Trend Generate trends for your models. Easily generate charts or reports. Support us Like our work? You can support us by purchasing one of ou

Flowframe 139 Dec 27, 2022
A simple way to generate files from stubs.

STUBBY A simple way to generate files from stubs. Usage For example we have a stub file that looks like this: <?php namespace {{ namespace }}; use A

Prince John Santillan 4 May 12, 2022
Laravel real-time CRUD using Google Firebase.

Laravel real-time CRUD using Google Firebase.

Fadi Mathlouthi 1 Oct 22, 2021
Simple CRUD + Search using Laravel 8 and Livewire 2

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

PowPow 11 Sep 29, 2022
Laravel Users | A Laravel Users CRUD Management Package

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

Jeremy Kenedy 393 Nov 28, 2022
rapyd: crud widgets for laravel. datatable, grids, forms, in a simple package

rapyd-laravel This is a pool of presentation and editing widgets (Grids and Forms) for laravel. Nothing to "generate", just some classes to let you de

Felice Ostuni 875 Dec 29, 2022