building restful apis with laravel n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
BUILDING RESTFUL APIS WITH LARAVEL PowerPoint Presentation
Download Presentation
BUILDING RESTFUL APIS WITH LARAVEL

Loading in 2 Seconds...

play fullscreen
1 / 7

BUILDING RESTFUL APIS WITH LARAVEL - PowerPoint PPT Presentation


  • 2 Views
  • Uploaded on

Within a short span of time, RESTful APIs have become an integral part of website and web application development. While developing web services, most web developers nowadays opt for these application programming interfaces (APIs) developed based on REpresentational State Transfer (REST) architectural style.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'BUILDING RESTFUL APIS WITH LARAVEL' - mindfiresolutions


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
within a short span of time restful apis have

 Within a short span of time, RESTful APIs have become an

integral part of website and web application development.

 While developing web services, most web developers

nowadays opt for these application programming interfaces

(APIs) developed based on REpresentational State Transfer

(REST) architectural style.

 Unlike conventional architectural styles, RESTful API facilitates

data exchange between web applications through an open and

stateless protocol – HTTP. It further uses HTTP requests to GET,

PUT, POST, and DELETE data.

the web developers can write restful apis

 The web developers can write RESTful APIs in a number of

programming languages including PHP and various PHP Frameworks.

 Here is a brief comparison of various PHP Frameworks. Though one of

the youngest ones, Laravel has emerged as a good framework for PHP

developers to work in the recent years. The PHP programmers can

build RESTful APIs using Laravel.

 Laravel simplifies development and testing of RESTful APIs by providing

a number of robust features – real-time communication, job queue,

and API authentication.

 But you, as a PHP programmer, must follow a sequence of steps in

building Restful APIs with Laravel quickly.

important steps in building restful apis with

Important Steps in Building RESTful APIs with

Laravel

Know Appropriate Use of HTTP Verbs

As noted earlier, RESTful APIs leverage a number of request methods defined by

HTTP. You have to use the specific HTTP verbs to perform the desired action on

specific resources. Hence, you must understand the use of important HTTP verbs –

GET, POST, PUT and DELETE clearly. While developing a RESTful API with Laravel,

create resources through POST and retrieve resources through GET. At the same time,

you have to use PUT to update resources and DELETE to remove resources. It is

always important to use the HTTP verbs in the most appropriate way.

set up laravel framework

Set up Laravel Framework

If you are yet to install Laravel, it is advisable to install the web

framework through the robust PHP dependency manager – Composer.

After installing Laravel on a development server, you need to spend

some time to understand its folder structure. The features provided by

Laravel will enable you to create simple RESTful APIs without putting

extra time and effort.

add endpoints that respond to specific http verbs

Add Endpoints that Respond to Specific HTTP Verbs

You can use Closures to create end points for various resources by modifying the

app/routes.php file. You can even follow the same procedure to create additional

end points that respond to GET requests. Also, you can make the end points

respond to PUT requests simply by replacing Route::get with Route::post. Similarly,

you can create end points that respond to other HTTP methods simply by

specifying the exact Route. Laravel even allows you to create end points that do not

respond to any specific HTTP methods.