Creating a Laravel API

  Рет қаралды 94,001

DigitalOcean

DigitalOcean

Күн бұрын

Пікірлер: 71
@joshstancombe2535
@joshstancombe2535 Жыл бұрын
Thanks for the video! For anyone struggling with an error of "Target class [PostController] does not exist" (or similar), you will need to update the 'Route::resource' line to be: "Route::resource('posts', 'App\Http\Controllers\PostController');" In later versions of Laravel, you have to use the Fully Qualified Class Name for your Controllers when referring to them in your routes when not using the namespace prefixing. 👍
@hello-matthew
@hello-matthew 3 жыл бұрын
I am now starting my very first Laravel project which is heavily API based -- This tutorial is invaluable, an absolute golden find!!! Thank you.
@GuzzX8
@GuzzX8 4 жыл бұрын
I have been writing my PHP Rest API without framework like Laravel all this time, and I think I should start to use Laravel sooner or later, Then I found this easy-to-understand-and-follow tutorial that get me started learning how to use Laravel, thanks Chris. I hope you make other sessions going deeper in Laravel.
@jamlizzy101
@jamlizzy101 4 жыл бұрын
You could shorten creating model, API controller and migration more in the command like this: *php artisan make:model Post -cma*
@joseramonbellido3516
@joseramonbellido3516 3 жыл бұрын
35:52 For Insomnia/Postman updating operation, you must use POST method and include in the body a key named "_method" with "PUT" as value.
@samiulsalehin2831
@samiulsalehin2831 4 жыл бұрын
Wow, this is really great. Do sessions like this more often.
@alpachino468
@alpachino468 4 жыл бұрын
What an awesome tutorial, thank you. I personally don't mind you trawling through the official docs; one can't possibly be expected to remember everything, and it's a good habit to get into. Thanks Chris and Digital Ocean :)
@TylerJusCodes
@TylerJusCodes 2 жыл бұрын
what folder did he install the laravel on that he was able to run the my-super-duper-api.test?
@DigitalOcean
@DigitalOcean 2 жыл бұрын
"I used Laravel Valet to create a folder that will be served from .test. Here's the Vapor docs laravel.com/docs/9.x/valet" - Chris
@JonibekJ
@JonibekJ 4 жыл бұрын
What a Great Content!! 😀 Please, make videos going deeper on laravel api. 🙏🙏
@jkbullitt8986
@jkbullitt8986 4 жыл бұрын
Chris on Code - Kudos as always bro!!
@fitbouncer6795
@fitbouncer6795 3 жыл бұрын
till 21min, tis problem is showing----SQLSTATE[HY000]: General error: 1364 Field 'slug' doesn't have a default value (SQL: insert into `posts` (`title`, `updated_at`, `created_at`) values (my first post, 2021-07-20 15:46:57, 2021-07-20 15:46:57)) i'm using xampp(phpmyadmin) tell the solution
@DigitalOcean
@DigitalOcean 3 жыл бұрын
Based on what you've described, it looks like you're using tools that are outside the scope of the tutorial. So unfortunately, we can't advice on this particular problem. But always reach out if you have questions and we'll see what we can do :)
@fitbouncer6795
@fitbouncer6795 3 жыл бұрын
No, I hadn't using any outside tool, I just followed what you have shown
@cholzdelrosario
@cholzdelrosario 4 жыл бұрын
Watch this twice , I hade to do codes then notes plus codes to not forget the syntax . haha I don't like searching the documentation without knowing the keywords. Thanks for the great content! :)
@mohamedabdelhalim9892
@mohamedabdelhalim9892 4 жыл бұрын
As a backend developer i gotta prepare such APIs for the front end and mobile developers to access the database right?
@londonboy3501
@londonboy3501 2 жыл бұрын
Indeed!
@Shogoeu
@Shogoeu 4 жыл бұрын
What about Lumen? Isn't it better to use that for APIs?
@ylmaz10
@ylmaz10 3 жыл бұрын
thanks bro, good video for laravel lovers
@kendallhayes4917
@kendallhayes4917 4 жыл бұрын
Does this video include jwt auth or unique API keys
@gunarcom
@gunarcom 4 жыл бұрын
I didn't know what I was missing until I installed the vs-code icons extension. Wowee it's easier to navigate.
@Ayoub_Himself
@Ayoub_Himself 4 жыл бұрын
May I ask what color scheme is that?
@MrL22
@MrL22 4 жыл бұрын
Thank you for this great tutorial. My only question would be: With large amounts of data being returned through the API. How would you go about managing pagination, passing a "p" or "page" integer and where or how would this be handled? I may have answered my own question but would it be that the function index returns 20 results by default but you use Eloquent skip() if "p" is set in the request?
@HassanAbuBakar
@HassanAbuBakar 2 жыл бұрын
HATEOAS might help
@Toozh
@Toozh 4 жыл бұрын
Create tutorial, exactly what I was looking for. My update request worked fine in the PostController, and I just followed you :)
@chocinspired
@chocinspired 4 жыл бұрын
Whats the best advice to scale well and load balance in Laravel.Great video.
@samueltorres2485
@samueltorres2485 4 жыл бұрын
For fillable, do you always have to put every column? I know its for mass assignment but what does that mean exactly? How do you know which columns you list in the fillable property?
@hijenelkhalifi9198
@hijenelkhalifi9198 2 жыл бұрын
if you are going to use validation , and only use validated data , than you can enable mass assignment globally ,, we identify the fillable fields so no one would add a variable to our request which we dont want to change ( for example role , status etc .. )
@kalaiselvi-ch2sf
@kalaiselvi-ch2sf 4 жыл бұрын
20:10 you put like "use App\Post" In that App means what? And this migrate command gives error as not found. Please help me
@devideeze7878
@devideeze7878 Жыл бұрын
did you solve this?
@shuttereff3ct593
@shuttereff3ct593 4 жыл бұрын
What a time to learn, thank you!
@meghak8212
@meghak8212 3 жыл бұрын
Thank you so much for making such a nice vedio .
@willian.schenkel
@willian.schenkel 4 жыл бұрын
Awesome, Laravel facilitates our life! btw, what is your vscode theme?
@seikosantana2313
@seikosantana2313 3 жыл бұрын
Why don't we have autocomplete for ::create?
@DigitalOcean
@DigitalOcean 3 жыл бұрын
It seems that Chris' text editor didn't do it for some reason on that one.
@bhoomivaghasiya2794
@bhoomivaghasiya2794 3 жыл бұрын
When I do 'php artisan migrate' I get this 'Access denied for user 'root'@'localhost error. I am using laravel 4.1.1. Please help me.
@dhanushd232
@dhanushd232 3 жыл бұрын
change DB_USERNAME and DB_PASSWORD in env file
@djnkuli
@djnkuli 4 жыл бұрын
This is awesome thank you for bringing me back to Laravel!!!!!
@baranbahari1441
@baranbahari1441 4 жыл бұрын
thanks for the tutorial, I was wondering what is the tool you're using to view your api-name.test in the browser, cause I was not able to find it by googling.
@devlopes102
@devlopes102 4 жыл бұрын
Conteúdo muito bom me ajudou muito, um salve aqui do Brasil.
@Akosiyawin
@Akosiyawin 3 жыл бұрын
Why is your VSCode showing some Intellisense for laravel, whilst mine is not haha.
@DigitalOcean
@DigitalOcean 3 жыл бұрын
Hey Yayin! Try installing the PHP Intelephense extension: marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client
@mihiranchathuranga8675
@mihiranchathuranga8675 4 жыл бұрын
Is this a Laravel rest api tutorial.
@mixtureworld7326
@mixtureworld7326 3 жыл бұрын
great tutorial man, I like this video do more stuff. cheers
@Roter_Wolf
@Roter_Wolf 4 жыл бұрын
Great video. It would be even better if there were timestamps
@keanallen
@keanallen 4 жыл бұрын
awesome lecturer. very clear.
@deepakjerry5030
@deepakjerry5030 3 жыл бұрын
Wow that's good content
@manish-ghimire
@manish-ghimire 4 жыл бұрын
22:58 DogController :D Anyway, nice video. Thx.
@AmbientResonanceSounds
@AmbientResonanceSounds 3 жыл бұрын
Great video and great quality content, I however how one request: Please speak a little slower and also be slower when interacting with your screen. You are very fast between switching windows and files etc... It's hard to follow and remember when it's so fast.
@yema8319
@yema8319 3 жыл бұрын
Is this still good in 2021?
@DigitalOcean
@DigitalOcean 3 жыл бұрын
Yes! Laravel has done a great job at not breaking its core functionality in years.
@sadiaarooj7283
@sadiaarooj7283 4 жыл бұрын
what an amazing tutorial
@mr_don_key
@mr_don_key 4 жыл бұрын
Why do you want this to be a slug and not id? i mean the ID never changes, the slug can.. making links to it (by favorites e.g.) go bust.
@sir_brian_d
@sir_brian_d 3 жыл бұрын
making videos on laravel to try and get forge users to switch to app platform. thanks but id rather my money go towards supporting the framework's developement instead of leeching from it.
@davidatebisun
@davidatebisun 4 жыл бұрын
This tutorial blew my mind. it so great
@JavierMartinez00
@JavierMartinez00 3 жыл бұрын
was it? 48 minutes in....can't even get his route defined.
@jamols09
@jamols09 4 жыл бұрын
Do a tutorial for Laravel with Dingo api
@talktosunnysethi
@talktosunnysethi 3 жыл бұрын
It's Cool !
@dennymactavish307
@dennymactavish307 4 жыл бұрын
nice
@SYR2025
@SYR2025 4 жыл бұрын
big thanks
@platoosom
@platoosom 4 жыл бұрын
Thank you.
@khanhpd3129
@khanhpd3129 3 жыл бұрын
thanksss
@iamchets
@iamchets 3 жыл бұрын
Crud has nothing to do with a restful api..
@softhitech
@softhitech 3 жыл бұрын
very dragged and lots of things are irrelevant as I was looking for a quick solution but i think you need to plan what steps should be followed to create a long video like this.
@mahmoudmohamed-oo3xs
@mahmoudmohamed-oo3xs 3 жыл бұрын
Wow, this is really great. Do sessions like this more often.
Getting Started With Laravel
38:24
DigitalOcean
Рет қаралды 15 М.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 145 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Junior Code Review: Simple Laravel API - in 5 Different Ways
9:34
Laravel Daily
Рет қаралды 77 М.
Laravel 8 REST API With Sanctum Authentication
54:13
Traversy Media
Рет қаралды 551 М.
From Laravel Blade to Vue.js + API [Live-coding Example]
22:28
Laravel Daily
Рет қаралды 169 М.
Laravel Migrations: 12 Useful Tips in 12 Minutes
12:06
Laravel Daily
Рет қаралды 81 М.
Securing a Laravel API in 20 minutes with JWTs
20:36
Andrew Schmelyun
Рет қаралды 79 М.
Life at DigitalOcean
2:40
DigitalOcean
Рет қаралды 223
Laravel Advanced 2021 - Jobs, Queues & Events Part 1
17:23
Coder's Tape
Рет қаралды 68 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН