Тёмный

How to Build a REST API With Laravel: PHP Full Course 

Envato Tuts+
Подписаться 1,5 млн
Просмотров 256 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 255   
@nelsonbaluyot6882
@nelsonbaluyot6882 Год назад
Dude this is the best turorial I've watched so far
@themindfulway876
@themindfulway876 6 месяцев назад
This guy sounds like a mix between documentary and a flight instructor. Awesome
@dieudonneoutchi8500
@dieudonneoutchi8500 5 месяцев назад
Exactly 😆!! that's crazy man !! I really appreciated ... Thk you
@stevehoober3712
@stevehoober3712 Год назад
Coming from MERN, this was the best video I needed to grasp everything. Thanks lot Jeremy
@envatotuts
@envatotuts Год назад
Glad you enjoyed it!
@nikalairom
@nikalairom Год назад
Great course and even greater way of explaining how to do it. Man, it takes a great amount of skill to translate something a bit complicated in such a simple way. Great work!
@envatotuts
@envatotuts Год назад
Glad you enjoyed it!
@SOFTSOLUTIONS-p5q
@SOFTSOLUTIONS-p5q Год назад
@@envatotuts How to validate if customer exists when saving invoices?
@mrbande32
@mrbande32 Год назад
True
@locrien8888
@locrien8888 5 месяцев назад
Please note for non-windows users you must use a forward slash rather than a backslash when using artisan make:resource folder/resourcename
@MrFixIt-le7rs
@MrFixIt-le7rs Год назад
Best Tutor, his teaching way gives you confident to start any project.
@HTDChannel
@HTDChannel Год назад
This is one of the greatest tutorials of all time, exactly what you need to know no extra bs
@al-morshedtours2161
@al-morshedtours2161 8 месяцев назад
Mindblowing , the way how he illustrate and explain things
@juanchongo77
@juanchongo77 10 месяцев назад
It is the best course i've never seen, Thank u so much!. Greetings from Venezuela
@mktNo1
@mktNo1 Год назад
I hadn't done with Laravel for a long time. It's really helpful. Thank you for your video.
@envatotuts
@envatotuts Год назад
Glad it was helpful!
@trungphanduc6729
@trungphanduc6729 Год назад
Ohhh VietNamese...
@oguzhansisman9322
@oguzhansisman9322 Год назад
Im really glad that i found this channel. I hope i can watch all your videos. Thank you!
@envatotuts
@envatotuts Год назад
I hope so too! But, there are a lot of videos!
@techloading3217
@techloading3217 6 месяцев назад
Best tutorial ever watched. keep it up. love your work.
@aribiali3574
@aribiali3574 2 года назад
Would u make a tutorial about react +laravel +authontification and thnx❤
@mackshonayi943
@mackshonayi943 6 месяцев назад
This is a great course, excellent teacher. Very clear explanations!
@Hexdy
@Hexdy Год назад
I've come from Django, React and Vue, and hate with my soul php, BUT laravel seems quite entertaining and your video made it usable for a project of mine, thank you!
@gillesashley9314
@gillesashley9314 Год назад
I'm done with the entire course, enjoyed every second of it and I'm gonna use it as reference in my upcoming projects. But Sir I have a request, could you please make a video on how to integrate Swagger docs into a laravel api? There are a couple of resources around, but most aren't helpful enough. Thank you.
@alnamaaengineering2731
@alnamaaengineering2731 2 года назад
can't recommend your tutorial enough, thanks a lot
@envatotuts
@envatotuts 2 года назад
Glad to hear that
@kurdev101
@kurdev101 9 месяцев назад
Thanks a lot, the first time I thought this video did not help me. But this video did help me a lot. Thank you again.
@dachshund_jow
@dachshund_jow 2 года назад
19:22 if don't see Route's data, to be seen 404 not found, Enter command "php artisan serve" in your project folder.
@hgrafa
@hgrafa 5 месяцев назад
Best and clear tutorial so far!
@matmitcheilando7266
@matmitcheilando7266 8 месяцев назад
It helps me a lot more than anything so far.... Thank you sensei
@ruzindanajules7040
@ruzindanajules7040 2 года назад
sir at what point did you define the method hasInvoices in the customerSeeder class .My ide flags it as undefined method.thank you
@MegaZombie0001
@MegaZombie0001 Год назад
I think Laravel creates that because of the relationship 'hasMany'. Laravel is smart enough (and abstracts lots of things) to understand customer class has many invoices so it says I should create function called hasInvoices. I am not sure but I think this is the case because it runs without problem
@remanonet7044
@remanonet7044 11 месяцев назад
Many Thanks, It was a pleasure to follow you in this tutorial
@bhardwaj_abhi3421
@bhardwaj_abhi3421 Год назад
one of the best video on rest api
@envatotuts
@envatotuts Год назад
Thank you so much 😀
@apnachannal9129
@apnachannal9129 2 года назад
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!
@envatotuts
@envatotuts 2 года назад
You are welcome!
@malikimoustapha4061
@malikimoustapha4061 4 месяца назад
thank for this valuable tuto, My question is there another tuto example that shows how to consume thise rest API?
@delvinnj-vh7gf
@delvinnj-vh7gf 3 месяца назад
Nice course, Could please make a video about graphQL in Laravel ?
@SaqibNaeem-ob7gp
@SaqibNaeem-ob7gp 6 месяцев назад
Amazing tutorial. One-in-all. Thanks Envato
@ITDevelopmentCafe
@ITDevelopmentCafe Год назад
Thank you for the very efficient course that you have explained in the simplest possible way.
@locrien8888
@locrien8888 5 месяцев назад
Great tutorial, it is really appreciated. What is your reasoning for CamelCase JSON rather than snake_casing? I see some people say it makes things easier for Java/C++/Python. Thoughts?
@bhedabipin9246
@bhedabipin9246 Год назад
I got everything I needed to know in this one video. Thank you!!
@paollarce5137
@paollarce5137 Год назад
What extension for VSC are you using ?
@TheKennyWorld
@TheKennyWorld Год назад
I believe that you need to use $request->validated() and not $request->all() in order to retrieve only the data that actually underwent validation.
@ridddlewrong
@ridddlewrong 8 месяцев назад
No it wont work because we put in rules array postalCode field name that will change into postal_code only after the $request->validated(), so you should leave it how it is with all()
@anarbairam
@anarbairam 17 дней назад
awesome teaching skills
@envatotuts
@envatotuts 17 дней назад
Thanks a ton! 😊 We’re thrilled you think so. Cheers!
@borakayalar
@borakayalar 9 месяцев назад
Perfect course! Many Thanks
@Almursalat.
@Almursalat. Год назад
very talented teacher - cheers
@envatotuts
@envatotuts Год назад
Thank you! Cheers!
@jlemuelDev
@jlemuelDev 5 месяцев назад
hope this have a frontend react implementation and using this api's
@ousssika5359
@ousssika5359 Год назад
$adminToken = $user->createToken("admin-token", ["create", "update", "delete"]); it return form me tha the createToken method is not define on the user
@ChampionChapters
@ChampionChapters Год назад
Same here. Did you manage to find a solution?
@vladimir8036
@vladimir8036 Год назад
Instantiate variable $user like this: $user = User::where('email', $credentials['email'])->first(); It will return App\Models\User instance, which should have HasApiTokens trait.
@emilebaelde
@emilebaelde 2 года назад
Great course but i have a question for you: How would you handle filtering on the relationship? For example, having products with translations but i only want to get the products which have English translations.
@bruhisbruh000
@bruhisbruh000 Год назад
Hi loved the tutorial just one question at 27:00 you said anyone using the API would expect camelcase , but i could stg every single third party API i used even from big companies like (google/facebook etc..) use the same naming conventions as SQL in their responses ( postal_code for example) , so which one is right lol
@vezzel1113
@vezzel1113 10 месяцев назад
could you make a more advanced tutorial this tutorial was really good.I learnt alot
@jorensynaeve5589
@jorensynaeve5589 2 года назад
Loving the course! Just what I needed. May I ask, what VS Code theme are you using?
@Maen963
@Maen963 2 года назад
i wish my like button turns into 1000 likes button ! what a PRO tutorial
@juancamilovallejos8328
@juancamilovallejos8328 Год назад
Very good and useful tutorial Thanks!
@marktheunknown1829
@marktheunknown1829 5 месяцев назад
Thank you very much, I enjoyed a lot
@andrewmedvedev963
@andrewmedvedev963 Год назад
Wow thank you. Great tutorial. A lot of valuable information was given.
@envatotuts
@envatotuts Год назад
Glad it was helpful!
@davidedema8240
@davidedema8240 Год назад
Wow. this is so easy to understand.
@lassestube
@lassestube 9 месяцев назад
Query builder has a when method instead of using if else
@value_investing_indonesia
@value_investing_indonesia Год назад
can someone explain to me i read the documentation however i still don't get the difference between with and loadMissing and when do i use them. Thanks
@alexandruaxentioi3006
@alexandruaxentioi3006 Год назад
Amazing course
@ehnehm
@ehnehm 5 месяцев назад
Intro song?
@israelterorisprikopat
@israelterorisprikopat Год назад
how about if we have 100 abilities or 100 role to apply to applicaton that we have build, so we must generate 100 token for those abbilities or role every sign in ? and how about make new abilities or role after applicaton running ? add the createtoken to the apps mannualy every time want to add new abilites or role ?
@DigitalHelpVault
@DigitalHelpVault 2 года назад
I have this issue please help: "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'postalCode' in 'field list' (SQL: insert into `customers`, I did everything but my prepareForValidation() is not working.
@DigitalHelpVault
@DigitalHelpVault 2 года назад
sorted
@gieldewinter7068
@gieldewinter7068 Год назад
Can you tell me pls how you solved it? I dont know how to solve
@TheYealoChannel
@TheYealoChannel Год назад
@@gieldewinter7068 Actual answer: postalCode in the $fillable array in the Customer model should actually be postal_code.
@JakubAdamus1991
@JakubAdamus1991 9 месяцев назад
Great video, thanks a lot!
@aatifbangash
@aatifbangash Год назад
Best of the best tutorial
@matthewlee-mu2kq
@matthewlee-mu2kq 4 месяца назад
At 28:20 I had to add an extra '\' for Laravel to create the correct filename and sub-directory... php artisan make:resource V1\\CustomerResource
@petersparks6954
@petersparks6954 Год назад
Anyone know if this works on Laravel 9 & PHP 8? I keep getting 404 on my routes /api/v1/customers ? Thanks
@chathuraedirisinghe5320
@chathuraedirisinghe5320 Год назад
yes it work
@ethans7395
@ethans7395 Год назад
Make sure the server is running with "php artisan serve"
@augischadiegils.5109
@augischadiegils.5109 2 года назад
Laravel and React please
@zabiremu
@zabiremu 7 месяцев назад
Great course for bro
@matthewlee-mu2kq
@matthewlee-mu2kq 4 месяца назад
The api routes didn't work for me. You need to install the API package with the following command... php artisan install:api What's more you need to install on a clean project (i.e. immediately after project create).
@dobroendless3373
@dobroendless3373 3 месяца назад
yes of course, after laravel 11 you need to install api packages
@karanjabrian9303
@karanjabrian9303 Год назад
Following Keenly. Is there any VSCode extension you are using to define comparison operators such as 'lte' sign? Someone help.
@remanonet7044
@remanonet7044 2 года назад
47:30 . Target class [App\Http\Controllers\Api\V1\Request] does not exist. what is the problem please ?
@easyscript549
@easyscript549 2 года назад
my working when put this --> use Illuminate\Http\Request; at top of customercontroller.php below it namespace, before the rest of 'use'
@abdullohsharipov3108
@abdullohsharipov3108 2 года назад
try 'composer dump-autoload --optimize' in your terminal.
@azamibragimov8771
@azamibragimov8771 Год назад
Wonderfull tutorial. I hope this will help many developers. I have one question though. What if you want to save file within post request? I have tried this and got an error. I might doing something wrong when handling the request, but Laravel tools to save file doesn't working at all. If anybody did this I would appreciate if this will be hinted here in comments.
@hsmyv
@hsmyv Год назад
All things worked but I have faced with error that 'General error: 1364 Field 'customer_id' doesn't have a default value' 01:23:04 implemented
@jamesschneider8677
@jamesschneider8677 Год назад
Excellent job! Thanks for sharing your thought process and for including versioning and auth.
@envatotuts
@envatotuts Год назад
Glad you enjoyed it!
@isaacnicholaus4361
@isaacnicholaus4361 10 месяцев назад
😇 Absolutely stunning~~) I appreciate your dedicated effort, the time you've invested, and your generous spirit in sharing this knowledge with us.
@SOFTSOLUTIONS-p5q
@SOFTSOLUTIONS-p5q Год назад
How to validate if customer exists when saving invoices?
@fatma-tv4gq
@fatma-tv4gq Год назад
what the version of laravel you are use?
@MayankSinghParmar
@MayankSinghParmar Год назад
Good tutorial!!
@ycheing
@ycheing Год назад
very good tutorial, thanks
@envatotuts
@envatotuts Год назад
Glad it was helpful!
@satishbangleshyd
@satishbangleshyd 2 года назад
cool tutorial, 100% works, +rep
@envatotuts
@envatotuts 2 года назад
Glad it helped
@DP-yv9tl
@DP-yv9tl Год назад
Great tutorial!
@envatotuts
@envatotuts Год назад
Thank you!
@abdallahelsaed1434
@abdallahelsaed1434 Год назад
i make all steps put this filter don't filter any thing i don't know what is error in my code can anyone see my code and help me ??
@pkiorpes
@pkiorpes Год назад
Great job. It would be nice to have a example many to many as well
@MuhammadShAhidKhAn-wc2zx
@MuhammadShAhidKhAn-wc2zx Год назад
Target class [App\Http\Controllers\api\V1\App\Http\api\V1\Controllers\CustomerController] does not exist i am getting this problem although i checked everything 4 5 times nd its same as it shown in video
@ethans7395
@ethans7395 Год назад
If I remember right, remove the "namespace" => " (namespace) " in the Route::group
@ttae1141
@ttae1141 2 года назад
thank you very much
@bytelyze
@bytelyze 3 месяца назад
when is the next one?
@aleksa_37
@aleksa_37 Год назад
Great video
@envatotuts
@envatotuts Год назад
Glad you enjoyed it
@AlexYT-f4e
@AlexYT-f4e Год назад
Great course. On the 'include related data' section: Wouldn't be easier to pass in the url something like "&with=invoices,roles,[etc]" in order to avoid writing params for each relation??
@alinternet4771
@alinternet4771 Год назад
Bad Method Call: Did you mean App\Models\customer::invoice() ? pls help me to solve this i really need it....
@Humby
@Humby Год назад
I might be late, but someone else might have this problem, in your App/Models/Customer.php for the public function, have the name of the function invoice instead of invoices, idk why but this works for me
@rexrandyhernandez3209
@rexrandyhernandez3209 2 года назад
How to shorten the response time of API calls of laravel? I always got 150-200ms in localhost server. May somebody help me please.
@envatotuts
@envatotuts 2 года назад
More memory and less processes running on the same server. Since you are running it on your local computer, response times will always be laggy due to the graphical processes being ran (desktop, user applications, etc). On a dedicated server with lots of memory, the response times are faster.
@GamerLife777
@GamerLife777 2 года назад
Good. 👍
@emretarhan0
@emretarhan0 7 месяцев назад
00:49:47
@jomsmario
@jomsmario Год назад
1:32:18 "message": "Class \"App\\Http\\Request\\V1BulkStoreInvoiceRequest\" does not exist", "exception": "ReflectionException" i got this error message anyone can help?
@lepystudio8974
@lepystudio8974 Год назад
check naming, class Declaration. I had the same error because I forgot to change the class from StoreCustomerRequest to BulkStoreInvoiceRequest
@ycheing
@ycheing Год назад
your \ is missing
@JuanHernandez-om6wr
@JuanHernandez-om6wr 9 месяцев назад
Crack!!!!
@coding23414
@coding23414 Год назад
great
@wallabeebeetles2519
@wallabeebeetles2519 Год назад
Hi, Thanks alot for the video. Could you kindly guide me on using the built-in CORS functionality in Laravel 10? I'm experiencing difficulties in triggering the CORS validation. I've already set up a local virtual machine for the Laravel project and used Postman to simulate different origins by setting the "Origin" headers. Could you confirm if I've followed the correct process?
@ifqygifhaazhar8786
@ifqygifhaazhar8786 2 года назад
pliss make tutorial verification email with jwt
@ayokurdo1888
@ayokurdo1888 11 месяцев назад
please source code ?
@kanker5256
@kanker5256 2 года назад
25:06 - unfortunately, adding a prefix to the routes just repeats (weirdly) the already 'app/http/controllers/v1/controllerName' after the given namespace; weird... so it results in something like Target class [NAMESPACE_GIVEN]\App\Http\Controllers\v1\[CONTROLLER_NAME] does does not exist. which is Target class App\Https\Controllers\v1\App\Http\Controllers\v1\[CONTROLLER_NAME] does not exist. NAMESPACE_GIVEN = App\Https\Controllers\v1
@yunusemretastan5655
@yunusemretastan5655 2 года назад
Like bro!)
@FabianoSoaresdaSilva
@FabianoSoaresdaSilva 2 года назад
sad because i can clique in like for this video only one time
@zindagikikhoj4180
@zindagikikhoj4180 Год назад
Wow
@augischadiegils.5109
@augischadiegils.5109 2 года назад
❤️❤️❤️❤️❤️❤️
@medtalks6146
@medtalks6146 10 месяцев назад
hey , from where the hasInvoices() in the seeder came from does laravel know it automatically?
@collectorX
@collectorX Месяц назад
yes due to the naming convention, laravel auto detects and does its magic. ofcoz the relationships have to be built
@muhammadumarsotvoldiev8768
@muhammadumarsotvoldiev8768 8 месяцев назад
Thank you very much! Very helpful
@thetheedesk
@thetheedesk 4 месяца назад
I am using laragon, and i have problems to display the object on web browser, anyone would know how to fix it? (404 | page not found)
@saiful-here
@saiful-here 10 месяцев назад
It was such a fantastic course to enjoy and learn. I had a lot of confusion about API development and even don't have such good ideas in case of API development. Thank you for this course.
@AbiodunSam
@AbiodunSam 2 года назад
What a nice tutotial - I like it. 44:43 While implementing filter transform, I didn't understand how "[gt]" and the likes were passed and where the $oprators arrays were gotten. Please, I need clearifcation.
@mayboyx
@mayboyx 4 месяца назад
As far as I know, Envato is talking about design. So, when I see this video, I'm little doubtful. But, surprisingly the explanation in this video is amazing and complete. For example, the versioning of API which is crucial in development but not discussed very often in another tutorial. Why you make a programming tutorial, Envato? Hahaha. Btw, thank you
Далее
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55
No-Nonsense Backend Engineering Roadmap
10:16
Просмотров 203 тыс.
Are we going back to PHP with fullstack JavaScript?
9:57
What is a REST API?
9:12
Просмотров 1,5 млн
Laravel SPA Authentication - setup and common mistakes
16:55
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Laravel + Livewire todo app (and so much more)
16:41
Просмотров 45 тыс.
Laravel 8 REST API With Sanctum Authentication
54:13
Просмотров 547 тыс.
DHH discusses SQLite (and Stoicism)
54:00
Просмотров 74 тыс.
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55