Laravel REST API Tutorial - Build an API in Laravel

preview_player
Показать описание
In this video you'll learn to build a REST API with Laravel 8. We'll add endpoints for creating, reading, updating and deleting a blog post. We'll also take a look at a VS code extension that allows you to test your APIs from within your code editor.

✅ Source code:

✅ Build a contact form in Laravel:

0:00 - Intro
0:26 - Database Setup
1:32 - The Post Model
2:45 - All Posts Endpoint
4:36 - Create New Post Endpoint
9:30 - Update Post Endpoint
13:08 - Delete Post Endpoint
15:22 - Refactoring (extracting a controller)

🔴 Want to learn practical web development? Make sure to subscribe:
Рекомендации по теме
Комментарии
Автор

just a tip, I would try to avoid using class names like Post, because with a beginner that might be confused with the http post method... be explicit with naming. BlogPost would be fine I think.

ItsPaulby
Автор

out of all API tutorials i've watched so far this was by far the best one, i even managed to follow along using postman and not the VS code tool

chris-zlrr
Автор

Thank you, it was really a great tutorial. I am using react as front end and laravel at backend, and i searched a lot wasted hours, you solved my problem

talhaturab
Автор

Thank you for the tutorial. It is easy to comprehend.

emmakade
Автор

This Tutorial is mind blowing simple and to the point. Love your video. Thanks a bunch.

basit_ali
Автор

I just loved the video. Straight to the point and explicit. Keep up!

eddieabbie
Автор

Outstanding tutorial! Clear and concise. Thank you.

keithlamontdavis
Автор

Thank you for this really great and excellent tutorial! You just saved me.

ludemus
Автор

Great tutorial sir, it is very helpful for me, as a beginner.Pls show the way to add image together.

saimonsaimon
Автор

Thankyou for such understandable content

malikabdulsamiawan
Автор

In my case, I was using Postman to update. Had to do the following to make things work:

request = POST (not PUT)
headers = (leave it, allow automatic values)
body = form-data, add a key called _method with value PUT

romel
Автор

Thank you for the course. I’m learned about rest api through this

sloneplace
Автор

Oh and great tutorial by the way thanks for the clear explanation :)

tech-trials
Автор

Thank you, that Rest client is fantastic!

bernanribeiro
Автор

Hi,
Thanks for the rest client. Subscribed

sharmaravin
Автор

Thank you so much mate, really well explained and helpful :)

bobbymcgrath
Автор

POST method on rest client extension doesn't seem to work with laravel 9. I'm guessing it has something to do with the crsf_token. how put csrf token inside the POST request? I tested on postman. It all works fine.

miraikuriyama
Автор

Hey, how did you setup the domain name
url <restfulapi.test> at 0.36sec also while routing api
url <restfulapi/api>
-->both of these urls are not working for my browser
I tried my best by changing the windows/.../hosts file & Xampp/.../conf file
Still not working...Can anyone help with this?

NishankaB
Автор

Very good tutorial. Congratulations. Please, can you explain how to make a new request that results in the user who created the post? Thank you

gober
Автор

Thanks for the tutorial, very easy to follow and clear explanations! Could I combine this tutorial with laravel breeze authentication to create a rest API with a login/registration/etc ?

pepetipo