Skip to content
Redlyst

Laravel 8 Tailwind Landing Page with Laragon

Laragon, Laravel, Tailwind, Guide1 min read

You can read the release notes for Laravel 8 here

Let's get started,

  • Download the latest laragon from this link and install, my edition is laragon full version 4
  • Check the composer version from terminal with this command
composer -V

if the version is not version 2, you need to upgrade it, tutorial is here

  • Check the php version, because the minimum PHP version for Laravel 8 is 7.3.0, if you need to add another version, follow this tutorial
  • Open "Laragon Menu > Quick App > Laravel" Quick App
  • Type your project name, and the terminal will be open and install the laravel to laragon directory Result
  • Download tailwind landing page from here and extract to project public folder
  • Rename "index.html" to "main.html"
  • Go to "project folder > resources > views"
  • Create a folder with name "frontend"
  • Copy "main.html" from public folder and paste to frontend folder above
  • Rename "main.html" to "index.blade.php"
  • Go to "project folder > routes" and open "web.php" to your editor
  • There is few way to change the routes
  • First, change this code below
Route::get('/', function () {
return view('welcome');
});

to

Route::get('/', function () {
return view('frontend/index');
});
  • And done, you can check the web via pretty url
  • Or you can create a controller with this command below, go to project directory and type to the terminal from laragon
php artisan make:controller LandingController
  • Go to "project folder > app > Http > Controller" and open "LandingController.php"
  • Add this code below
public function index(Request $request)
{
return view('frontend/index');
}

full code will be like this Code

  • After that change this code below
Route::get('/', function () {
return view('welcome');
});

to

use App\Http\Controllers\LandingController;
Route::get('/',[LandingController::class, 'index']);
  • Done, check the result and will be like this Yaaay
© 2023 by Redlyst. All rights reserved.
©LekoArts