Skip to content

Update Tailwind CSS integration example for Laravel #2260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AhmedAlaa4611
Copy link

Description

This PR updates the documentation to reflect the actual default integration of Tailwind CSS in Laravel as shown in the official Laravel repository.

Reason

The current Tailwind documentation for Laravel does not accurately reflect how Tailwind is integrated by default in the latest Laravel releases. This update ensures that new users following the guide get a setup experience that matches the actual Laravel boilerplate.

Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2025 7:00am

@rozsazoltan
Copy link
Contributor

rozsazoltan commented May 23, 2025

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

The link pointing to the vendor folder makes sense; but if you're not using pagination - like me - it seems like an unnecessary guide, especially since the Laravel Docs specifically cover it in the Pagination section.

@source '../../storage/framework/views/*.php';

When building, I'd rather exclude storage/framework/views than inject it - but that's a matter of personal relevance. If adding the views is truly important, it's justified by the .gitignore, as it does indeed exclude them, which causes automatic source detection to miss them.

@source '../**/*.blade.php';
@source '../**/*.js';

I didn't see much point in the other two either, since automatic source detection should handle all of them anyway. I see the point of these only if the source is disabled or specifically configured during @import. In that case, completing the paths is indeed useful. However, the docs recommend not doing that and instead using @import "tailwindcss"; on its own.

While explicitly adding these sources can indeed be helpful for beginners, I just wanted to share my thoughts on the matter here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants