Laravel - connect to development server

991 Views Asked by At

I just installed laravel and need some clues regarding "development server" and how I can run a project.

I connected to laravel development center which opened port 8000 on localhost. So I access my project at

localhost:8000

It wouldn't work if I typed in localhost/thelaravelproject/somepage , as I do with other php projects during development.

After closing the command line tool, localhost:8000 became inactive, so I opened the command line again, entered the path, and then

php artisan serve

and then it was running again. Does this mean that I have to do this every time?

On this page laravel.com/docs/4.2/quick it says something about "Local Development Environment" and it mentions Laravel Homestead. Is this something that is needed to run laravel using localhost the way I normally work with php?

I follow tutorials, but it's strange how they leave out very important details.

2

There are 2 best solutions below

1
On

I found out that localhost works the normal way, I just have to add the 'public' directory.

So if I type in

localhost/thelaravelproject/public

it shows the 'you have arrived' page.

0
On

In laravel project Directory every things first goes to the public/index.php. so it have to be in that directory. you have to start from this localhost/thelaravelproject/public. following link will help you.