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
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
0 comments:
Post a Comment