Reputation: 1
I have installed Laravel script which has his own front page (homepage) which i dont like and wanted to replace with my own html. I moved css, images to public folder, renames index.html to index.blade.php (moved to resources/views) and added routing - Route::get('/index2', function () {return view('index2');}); but it does not load my homepage. I changed all links to css inside my home.blade.php like this - /assets/css/styles.css" rel="stylesheet"> .
Thank you for your help!
Upvotes: 0
Views: 228
Reputation: 620
First of all, remove the default Route from web.php and Add below code
Route::get('/', function () {
return view('index'); //Change blade as per your file name
})->name('home');
homecontroller@index
This is the default controller and index
method which you get. Basically in index method returns the default welcome page blade. You can use that as well if you want.
<a href="route('home')"></a>
like this.Upvotes: 0