Here’s a custom 404 error page using Tailwind CSS for your Laravel project. You can place this in the resources/views/errors/404.blade.php file:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Page Not Found</title> @vite('resources/css/app.css') <!-- If you're using Laravel Vite for asset compilation --> </head> <body class="bg-gray-100 flex items-center justify-center h-screen"> <div class="text-center p-6 bg-white rounded-lg shadow-lg max-w-sm mx-auto"> <h1 class="text-6xl font-bold text-red-500">404</h1> <p class="mt-4 text-lg text-gray-700">Sorry, the page you're looking for doesn't exist.</p> <a href="{{ url('/') }}" class="mt-6 inline-block px-6 py-3 text-lg text-white bg-blue-600 rounded-full hover:bg-blue-700 transition"> Go Back Home </a> </div> </body> </html>