Coder Social home page Coder Social logo

larawire's Introduction

NO LONGER MAINTAINED

This package is no longer maintained. Please consider my latest package here: https://github.com/redbastie/tailwire


Larawire

Laravel + Livewire + Bootstrap auth UI & CRUD scaffolding.

Requirements:

  • Laravel 8
  • NPM

Features include:

  • auth UI & CRUD scaffolding
  • automatic routing & migrations
  • user profile, timezones, & CRUD
  • infinite scrolling & reCAPTCHA
  • & more

Links:

Installation

Install Laravel:

laravel new {app}

Configure the .env app, database, & mail variables:

APP_*
DB_*
MAIL_*

Install Larawire via composer:

composer require redbastie/larawire

Now you can run the make:auth command to generate auth UI scaffolding.

Commands

Generate auth UI scaffolding:

php artisan make:auth

Now you can visit your app URL and login using [email protected]:password.
This user was created via the DatabaseSeeder during auth scaffolding.


Generate CRUD scaffolding:

php artisan make:crud {model}

Remember to update the new model migrations, definitions, and CRUD rules.
Then run the migrate:auto command afterwards.


Run automatic migrations:

php artisan migrate:auto {--fresh} {--seed}

This automatically diffs the database via doctrine using model migration methods.

larawire's People

Contributors

redbastie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

larawire's Issues

Idea: Routing improvement

Hi there! I was inspired by migrations and routing, that is genius!

Problem:
I have Livewire components which are used in multiple routes.

Idea:
Add possibility to set list of routes in component as array.

class SomeLivewireComponent extends Component
{
    public array $routes = [
        'properties/create' => [
            'name' => 'properties.create',
            'middleware' => 'auth'
        ],
        'properties/edit/{property:id}' => [
            'name' => 'properties.edit',
            'middleware' => 'auth'
        ]
    ];
    ...

Quick workaround web.php:

Route::middleware('web')->group(function () {
    $filesystem = new Filesystem;
    $dir = app_path('Http/Livewire');
    if($filesystem->exists($dir)){
        foreach($filesystem->allFiles($dir) as $file){
            $namespace = 'App\\Http\\Livewire\\' . str_replace(['/', '.php'], ['\\', ''], $file->getRelativePathname());
            $class = app($namespace);

            if(property_exists($class, 'routes')){
                foreach($class->routes as $route => $data){
                    $route = Route::get($route, $namespace);

                    if(!empty($data['middleware'])){
                        $route->middleware($data['middleware']);
                    }

                    if(!empty($data['name'])){
                        $route->name($data['name']);
                    }
                }
            }
            elseif(property_exists($class, 'routeUri')){

                $route = Route::get($class->routeUri, $namespace);

                if(property_exists($class, 'routeDomain')){
                    $route->domain($class->routeDomain);
                }

                if(property_exists($class, 'routeMiddleware')){
                    $route->middleware($class->routeMiddleware);
                }

                if(property_exists($class, 'routeName')){
                    $route->name($class->routeName);
                }
            }
        }
    }
});

Feature Request - Tailwind & Php artisan html

Hello,

Im enjoy using your composer,

i think would be great to using tailwind than bootstrap, just my opinion, i starts edit to tailwind and make each input or datatables to component, and finally a little remake fot stubs, so can reuse more easy

and in closed issues i watch conversations about

  1. Update model
  2. php artisan html
  3. Then livewire view and controller update file get data from model

Any eta for this request? i think would be great
Thank you

Illuminate Database QueryException

Hello,
I'm trying to create a new app with Larawire, but when I run the php artisan make:auth command I have the following error:

 Illuminate\Database\QueryException

  could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

  at C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:678
    674▕         // If an exception occurs when attempting to run a query, we'll format the error
    675▕         // message to include the bindings with SQL, which will make this exception a
    676▕         // lot more helpful to the developer instead of just the database's errors.
    677▕         catch (Exception $e) {
  ➜ 678▕             throw new QueryException(
    679▕                 $query, $this->prepareBindings($bindings), $e
    680▕             );
    681▕         }
    682▕

If I try to install doctrine/dbal have another error:

$ composer require doctrine/dbal
Using version ^3.0 for doctrine/dbal
./composer.json has been updated
Running composer update doctrine/dbal
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - redbastie/larawire is locked to version 1.6.1 and an update of this package was not requested.
    - redbastie/larawire 1.6.1 requires doctrine/dbal ^2.0 -> found doctrine/dbal[2.1.5, ..., 2.12.x-dev] but it conflicts with your root composer.json require (^3.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I've deployed the app with XAMPP, PHP8 and MySQL 8.

Thanks for your contribution!

Suggestion

Really nice Package.
Was just wondering if in roadmap there is possibility to generate fields based on database fields.
Or define fields while creating the model and this fields are added in the migration as well as form.blade.php

Flash messages when data added or deleted world be awesome.

Too many issues to list.....

Ran composer command. Barely any dependencies passed the version requirements.

C:\xampp\htdocs\ordergenie>composer require redbastie/larawire
Using version ^1.2 for redbastie/larawire
./composer.json has been updated
Running composer update redbastie/larawire --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- torann/geoip[dev-master, 1.2.0, ..., 1.2.1] require php ^7.2 -> your php version (8.0.0) does not satisfy that requirement.
- torann/geoip[1.0.10, ..., 1.1.x-dev] require php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- torann/geoip 1.0.9 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- illuminate/support[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.0.0) does not satisfy that requirement.
- jamesmills/laravel-timezone[1.9.0, ..., 1.9.2] require laravel/framework 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 -> found laravel/framework[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with your root composer.json require (^8.12).
- Root composer.json requires redbastie/larawire ^1.2 -> satisfiable by redbastie/larawire[1.2.0].
- Conclusion: don't install laravel/framework v8.12.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.12.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.12.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.13.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.14.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.15.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.16.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.16.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.18.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.18.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.19.0 (conflict analysis result)
- redbastie/larawire 1.2.0 requires jamesmills/laravel-timezone ^1.9 -> satisfiable by jamesmills/laravel-timezone[1.9.0, 1.9.1, 1.9.2, 1.9.3].
- torann/geoip 1.0.x-dev is an alias of torann/geoip dev-master and thus requires it to be installed too.
- jamesmills/laravel-timezone 1.9.3 requires torann/geoip ^1.0 -> satisfiable by torann/geoip[1.0.0, ..., 1.2.1].
- torann/geoip[1.0.0, ..., 1.0.x-dev] require illuminate/support ~5.0 -> satisfiable by illuminate/support[v5.0.0, ..., 5.8.x-dev].
- torann/geoip 1.0.8 requires illuminate/support 5.0.* || 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* || 5.7.* -> satisfiable by illuminate/support[v5.0.0, ..., 5.7.x-dev].
- torann/geoip[1.0.6, ..., 1.0.7] require illuminate/support 5.0.* || 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.6.* -> satisfiable by illuminate/support[v5.0.0, ..., 5.6.x-dev].
- Only one of these can be installed: illuminate/support[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v8.12.0, ..., 8.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- redbastie/larawire 1.2.0 requires laravel/framework ^8.0 -> satisfiable by laravel/framework[v8.12.0, ..., 8.x-dev].
- Conclusion: don't install laravel/framework v8.12.0 (conflict analysis result)

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.