Hey guys am new to laravel and when i create route veiw to .blade.php page it's doesn't work with apache2 localhost even with virtual host but if i run php artisan server it works fine.
Here's My code :
In web.php file in routes directory:
Route::get('users', function(){
return view('users');});
In resources/view i have users.blade.php it contain:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Users</title>
</head>
<body>
<h1>Welcome From Users View</h1>
</body>
</html>
Now if I open localhost/project/public it will work and show me laravel default page.
But if I run localhost/project/public/users it won't work.
But When i type in terminal php artisan ser and go to 127.0.0.1:8080 'as he told me then' /users it will work just fine and show me the content of users.blade.php
Some info about the enviroment :
Linux Mint 21 Cinnamon 5.4.12
and Apache2 local server without xampp or lampp
All the extentions are installed