Git Product home page Git Product logo

livewire-crud's Introduction

Crud Example of livewire best practices (TALL Stack)

crud

Installation

  • Clone the repo
git clone https://github.com/mr-punyapal/livewire-crud.git

&&

cd livewire-crud
  • Install composer dependencies
composer install
  • Install npm dependencies
npm install
  • Create a copy of your .env file
cp .env.example .env
  • Generate an app encryption key
php artisan key:generate
  • Create an empty database for our application

  • In the .env file, add database information to allow Laravel to connect to the database

  • Migrate the database

php artisan migrate
  • Seed the database
php artisan db:seed
  • Run the development server (Ctrl+C to close)
php artisan serve

Installation with Docker (Bonus)

Duplicate the .env.example file and rename it to .env.

cp .env.example .env

Change the DB host on .env file.

DB_HOST=livewire-crud-mysql

Enter into .docker/ and start containers.

# Wait until you see PHP-FPM / MySQL success messages.
docker compose up 

In another terminal, also in .docker/ folder, enter into docker container.

docker compose exec livewire-crud-app zsh

Now, inside that container terminal migrate, seed, install dependencies and start server.

# See `composer.json` to learn about it.

composer start

Done! See http://localhost:8216

Test

  • Run the test
php artisan test

give feedback on @MrPunyapal

livewire-crud's People

Contributors

mrpunyapal avatar robsontenorio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

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.