Install daisyUI for Laravel
How to install Tailwind CSS and daisyUI in a Laravel project
1. Create a new Laravel project
Install PHP, Composer and Laravel Installer according to the official Laravel documentation
Create a new Laravel project
Terminal
laravel new my-app
cd my-app2. Install daisyUI
Terminal
npm i -D daisyui@latestPut Tailwind CSS and daisyUI in your CSS file (and remove old styles)
resources/css/app.css
@import "tailwindcss";
@source "../**/*.blade.php";
@source "../**/*.js";
@source "../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php";
@source "../../storage/framework/views/*.php";
@plugin "daisyui";3. Run your project
Run your Laravel project
Terminal
php artisan serveAnd on another terminal tab, run Vite
Terminal
npm run devNow you can use daisyUI class names!
Do you have a question? Ask on GitHub or Discord server
Do you like daisyUI? Post about it!
Support daisyUI's development: Open Collective
BLUEPRINT