11.08.2017 Views

codebright

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Controllers 89<br />

Here we have our Article controller once more. The intention of the actions are to provide a form<br />

to create and handle the creation of a new blog article. You’ll notice that the names of the actions<br />

have been prefixed with get and post. Those are our HTTP request verbs.<br />

So, in the above example you might think that we have represented end points for the following<br />

URLs:<br />

1 GET /create<br />

2 POST /create<br />

You might also be wondering how we route to our RESTful controller. You see, using the verb<br />

methods on the Route class wouldn’t make much sense here. Well, say goodbye to routing to<br />

individual actions. Let’s take a look at another routing method.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!