Problem is that in your public folder you have a blog folder.
Aug 13, 2020
7
Level 5
Why Am I Getting This Error?
I know it is probably something pretty simple but for the life of me I cannot figure out why I get this error:
The requested resource /blog was not found on this server.
Route
Route::resource('/blog','BlogController');
BlogController
public function index()
{
return view('blog.index');
}
Blog.index
@extends('layouts.bloglayout')
@section('content')
TEST BLOG PAGE
@endsection
bloglayout
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Scripts -->
<script src="{{ asset('blog/js/app.js') }}" defer></script>
<!-- Styles -->
<!-- Custom styles for this template -->
<link href="blog/css/clean-blog.min.css" rel="stylesheet"></head>
<body>
@include('inc.navbar')
@include('inc.jumbotron')
<div id="app">
<main class="py-4">
<div class="container">
@include('inc.alerts')
@yield('content')
</div>
</main>
</div>
<script src="blog/js/clean-blog.min.js"></script>
</body>
</html>
Level 60
@artisticre you have to rename the blog folder from your public directory to something else, when you hit localhost:8000/blog apache or nginx scans the public directory first, and if there's a match it tries to load index.php, or index.html or index.htm inside that folder, and because you don't have index.php - you get: The requested resource /blog was not found on this server.
Edit*
@jlrdw I tried to explain above
Please or to participate in this conversation.