Тёмный

Making a create route - How to make a Laravel CRUD API Tutorial #3 

Quentin Watt Tutorials
Подписаться 159 тыс.
Просмотров 23 тыс.
50% 1

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

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@foroughsarrafzadeh276
@foroughsarrafzadeh276 5 лет назад
Best tutorials ever Thank you very much
@QuentinWatt
@QuentinWatt 5 лет назад
Thank you 😊 glad you like them
@shafqatalinawaz3868
@shafqatalinawaz3868 5 лет назад
Superb Explanation :) Great Tutorial, thank you so much for putting in so much time and effort.
@QuentinWatt
@QuentinWatt 5 лет назад
Thank you watching. I'm glad it helped. 😬
@willjimmy5260
@willjimmy5260 4 года назад
How could i removed specific KEY Values from data (Items) , for in your JSON example i want to remove "City" from your result than how could it possible ?
@QuentinWatt
@QuentinWatt 4 года назад
If you’re using the same project as me. Simply remove it from the people api resource file we created. By the looks of your other comment you have a different project open so I’m not sure what the answer is.
@willjimmy5260
@willjimmy5260 4 года назад
@@QuentinWatt I solved that issue by using protected $hidden = [ 'logo' ]; in my model file.
@willjimmy5260
@willjimmy5260 4 года назад
I am getting BLOB data in my result how can i change those data in base64, i got an error of UTF-8 character
@QuentinWatt
@QuentinWatt 4 года назад
This wouldn’t be from my tutorial. If it’s stored in the database as a blob you can covert it with a helper function.
@willjimmy5260
@willjimmy5260 4 года назад
@@QuentinWatt Hi , Thanks for fast reply and yes it's not in your tutorial but i follow your tutorial and fetch data from my database , in my DB i have username, dob & image (blob data) so i need your help to fetch those data. Your help highly Appreciated!
@ahmedganna7632
@ahmedganna7632 4 года назад
Thank you very much very useful
@QuentinWatt
@QuentinWatt 4 года назад
You are welcome
@KgfLikia
@KgfLikia 5 лет назад
well actually i don't use this Resource because: you can use this to make arrays from data, where the result: { "room": { "id": 4, "user_id": 4, "name": "Macedonia Palace", "city": "Thessaloniki", "area": "GEvGCHN2WMasd", "photo": "images/room-4.jpg", "room_type": "Single Room", "count_of_guests": 1, "price": 85, "location": "asdasdasdasdasd", "lat_location": 31.48, "lng_location": 93.27, "short_description": "C1askfYfChm3PHJl97c9nr7trcKR2rYzHEqliaPPIjCLzbd1nM", "long_description": "K1d8WD8U8G", "parking": "No", "wifi": "Yes", "pet_friendly": "No", "created_at": "2019-03-16 17:46:37", "updated_at": "2019-03-30 09:14:57" }, "title": "Macedonia Palace" } return [ 'room' => $room, 'title' => $room->name, ];
@QuentinWatt
@QuentinWatt 5 лет назад
There are many different ways to go about it, but a resource is quite well structured so it's just the way I like to work.
@QuentinWatt
@QuentinWatt 4 года назад
You can shorten the array in the resource instead. The great thing about the resource, is you can make 1 resource and return it everywhere. For places like lists and cards where you won't use all the data, you can make a summarized resource.
@aotegaliyev
@aotegaliyev 4 года назад
hello thank u very much! i d like to ask one question, how to use string variables as a dynamic route instead of id? like instagram.com/username
@QuentinWatt
@QuentinWatt 4 года назад
You can set a unique slug field in the database and use that as the route key with function getRouteKeyName() laravel.com/docs/8.x/routing#implicit-binding
@AlexhMatias
@AlexhMatias 4 года назад
que laravel broda ?
@anythbutyouuu
@anythbutyouuu 5 лет назад
can i get your social media contact?, i want to ask you something urgent, I am very troubled, and I will be very happy if you want to help me, Thank you for making this video before,
@QuentinWatt
@QuentinWatt 4 года назад
There are social media links in the description of every video :)
Далее
Laravel: Create Public API with Cache and Rate Limits
12:18
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Laravel 8 REST API With Sanctum Authentication
54:13
Просмотров 547 тыс.
Securing a Laravel API in 20 minutes with JWTs
20:36
Просмотров 78 тыс.
The Home Server I've Been Wanting
18:14
Просмотров 139 тыс.
Creating a Laravel API
59:10
Просмотров 93 тыс.
I built 10 web apps... with 10 different languages
14:23