For this project I stuck with what I knew would be awesome to look at and also demonstrate some of Laravel's latest trends.
The project has been developed with the TALL stack (Tailwind, Alpine.js, Laravel and Livewire).
NOTE
This project depends on the host running a MacOS, Linux or WSL2 environment with PHP.
git clone [email protected]:nathandaly/categories-crud.git
cd categories-crud
Copy the example .env
cp .env.example .env
composer install
Followed by
npm install
npm run dev
NOTE
If your host system is not running PHP 8 then you will need to add --ignore-platform-reqs
. to the composer command.
Once the PHP and node dependencies have been resolved you can run the Sail containers.
export APP_PORT=8082 && ./vendor/bin/sail up -d
This command will normally take few minutes and will download and build the required containers.
The project contains migration for the database structure as well as a DotFive
user and example data which you can seed.
./vendor/bin/sail artisan migrate
./vendor/bin/sail artisan db:seed
That should be all that is necessary for the application to be usable.
Just head over to localhost::8082
and login with the following credentials:
email: [email protected]
password: password
If I had more time:
- Testing for livewire components
- Implement real-time cross browser changes with Laravel events and Echo
- Implement multiple categories to list edit form
- Implement add edit and category forms
- Add ordering logic for items (position field has already been added to the migration)
- Example CRUD controller logic (with Livewire you can almost go down the non-controller route)
- Created a generic form component that both add and edit could share with common methods such as
refresh()
andsave()