0

I am new to the laravel framework. I started a tutorial video on tuts, and followed the directions exactly. I setup laravel and was able to access localhost/laravel/public just fine. I even changed routes.php and was still able to access localhost/laravel/public. However, the next step in the tutorial was to create a new Route. my new Route looks like this

Route::get('post', 'PostController@show');

I then created a new controller called PostController. The file looks like this:

<?php

class PostController extends BaseController
{
    public function show()
    {
        return View::make('post.show');
    }
}

Next, the tutorial asked me to create a show.php in a new directory called "post". Then when I access localhost/laravel/public/post the "show.php" should appear. Instead I receive an error that says

"The requested URL /laravel/public/post was not found on this server"

I am running Apache/2.4.9 (win64) PHP/5.5.12 Server at localhost Port 80

Once again, I followed the exact instructions from tutsplus.

jrenk
  • 1,387
  • 3
  • 24
  • 46
Eddie Greathouse
  • 125
  • 1
  • 5
  • 14
  • What is the `DocumentRoot` of your vhost setup to point to? What happens if you try to visit `localhost/laravel/post` instead? Also, can you post the link to the tutorial you're trying to follow? – Jeff Lambert Oct 01 '14 at 16:50
  • possible duplicate of [Can't access URL in Laravel routes](http://stackoverflow.com/questions/26133517/cant-access-url-in-laravel-routes) – Marcin Nabiałek Oct 01 '14 at 17:03
  • here is a link to the tutorial http://code.tutsplus.com/articles/new-course-getting-started-with-laravel-4--cms-22162 – Eddie Greathouse Oct 01 '14 at 19:01

1 Answers1

2

You need to check wheather the httpd.conf and .htaccess files are set properly.You need to make sure if document root is pointing to the laravels public directory.

Please have a check here

Community
  • 1
  • 1
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26