For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, March 13, 2015

Create a simple page in Laravel using Controller

Create a simple page in Laravel using Controller

1) Create a "ClientpagesController.php" file in "app/controllers/" folder as below contents

<?php
class ClientpagesController extends \BaseController {
  public function contactus(){
     return View::make("contactme");
  }
}

2) Open "app/routes.php" file and paste as:
Route::get("contactus" , "ClientpagesController@contactus");

3) Now create "contactme.php" in "app/views/" folder with any matter,
<html>
...............................
...............................
...............................
</html>

4) Now open this url in browser:
http://localhost:90/MyLaravel/public/contactus
Share:

0 comments:

Post a Comment

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights

Unable to resolve <website url> Try checking the for validity Google Pagespeed Insights   You have a website and want to test it'...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive