3.4 RESTful Controllers
RESTful web applications respond to meaningful HTTP verbs with appropriate data. They are
very useful when building public API’s for your applications.
With Laravel you can have your controller actions respond to individual HTTP verbs using
RESTful controller actions, let’s see this in action.
1 <?php
2
3 // application/controllers/home.php
4 class Home_Controller extends Base_Controller
5 {
6 public $restful = true;
7
8 public function get_index()
9 {
10 //
11 }
12
13 public function post_index()
14 {
15 //
16 }
17
18 }
Yasar Khan
Skills Laravel
Qualifications :-Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- Hi i am yasar working as web developer since last 3 years.
Explore