Create your first page in Laravel 4.2

Laravel is the most popular PHP framework. Also, it is very easy to learn and use(like Yii). With Laravel you can easily create your websites.

In this tutorial I will explain how you can create your first page in Laravel.

So, to create a new page in Laravel:

  • Go to your¬†laravel\test\app\views folder.
  • Create a new php file(example: page.php).
  • Open Your controller and add this code:

public function showPage()
return View::make('page');

  • Create a new url for your new page, open routes file and add this code:

Route::get('/page', function()
return View::make('page');

  • Now go to http://localhost/laravel/public/page and you will see your created page.

As you can see, its very easy to use Laravel.

Video tutorial:

Leave a Comment