Laravel Advanced - Eloquent Api Resource - Complete Explanation

  Рет қаралды 17,391

Laratips

Laratips

Күн бұрын

In this video, we will be looking at complete detail of Laravel Eloquent Api Resource. I will walk you through the documentation and show you each and every part of it.
When building an API, you may need a transformation layer that sits between your Eloquent models and the JSON responses that are actually returned to your application's users. For example, you may wish to display certain attributes for a subset of users and not others, or you may wish to always include certain relationships in the JSON representation of your models. Eloquent's resource classes allow you to expressively and easily transform your models and model collections into JSON.
The above description is from Laravel's documentation.
=== Offer ===
Laravel Hosting: platform.cloudways.com/signup...
Get up to Free Hosting by using code "LARATIPS" and you get $15 as credit which can last almost a month.
Cloudways offers peace of mind and flexibility so you can focus on growing your business and reaching new milestones instead of dealing with server management. With Cloudways, you get an optimized stack, managed servers, backups, staging environment, integrated Git, pre-configured, Composer, 24/7 support, and the choice of five cloud providers: AWS, DigitalOcean, Linode, Google Cloud, and Vultr
================== Honeybadger ==================
Track errors, up-time, deployments, etc in your production app/website with Honeybadger in real-time. For full detail, plz check the link below.
bit.ly/3dvqLfb
=== Support ===
If you want me to continue making this kind of video for free on KZbin, then you can help me financially by sending a few bucks to my Wise (bit.ly/3dnBRmX) account in Nepalese 🇳🇵 currency.
My Wise email: ashish.dhamala2015@gmail.com
If you decide to support me, please send me your Twitter handle in the mail so that I can shout out about you.
=== Social Media Links ===
Let's be friends
/ aashish_dhamala
=== Video Related Links ===
Laravel Documention link:
laravel.com/docs/9.x/eloquent...
Ecommerce Project - Playlist
• E-Commerce
00:00 Intro
00:29 Introduction
01:12 How to create a resource
02:43 Using the resource
03:57 Modifying the user resource
05:40 Making resource collection
07:07 Using the resource collection
08:37 Preserving keys
09:55 Customizing underlying resource class
11:29 Showing relationship
15:14 Data wrapping
18:31 Conditional Attributes
19:20 Showing single data conditionally
23:08 Showing multiple data conditionally
26:11 Conditional relationship counts
28:04 Conditional pivot relationship
30:09 Adding meta data
36:06 Response headers
36:38 Finalizing
=== Other Videos ===
What's New In Laravel 9
• Laravel 9 Is Released ...
New In Laravel Playlist
• New In Laravel
Laravel Package Development Playlist
• Laravel Package Develo...
Password Validation In Laravel with at least one Letters, Numbers, Upper and Lowercase or Symbols:
• Password Validation In...
Multiple Apis With ForwardsCalls Trait And Code Refactoring Tip - Laravel Hidden Feature:
• Multiple Apis With For...
Laravel Chunking - You Might Be Doing This Wrong - Problem and Solution:
• Laravel Chunking - You...
Laravel Tip - Properly Get Data Between Two Dates
• Laravel Tip - Properly...
Get Data From Multiple Databases In One Project | Laravel Tip
• Get Data From Multiple...
=== Theme and Font Used ===
Theme:
Cobalt2 Theme Official (marketplace.visualstudio.com/...)
Font:
JetBrains Mono (www.jetbrains.com/lp/mono/)
=== Tech stack ===
Laravel
PHP
#laravel #php #laraveltip #laratips

Пікірлер: 33
@Laratips
@Laratips Жыл бұрын
Hello guys, if you want me to make more videos like this then please consider supporting this channel by giving a "Super Thanks". You can check the description for other ways of supporting this channel. And thank you so much from the bottom of my heart to those who have supported this channel ❤.
@JeremyMoore1
@JeremyMoore1 6 күн бұрын
nice overview. I enjoyed the pace. 👍
@SharefulIslam
@SharefulIslam Жыл бұрын
Good content. Recommended for Laravel developers.
@usamaabbasi8310
@usamaabbasi8310 Жыл бұрын
What a Deep Explanation in a simple way. Great work.
@Laratips
@Laratips Жыл бұрын
Thanks. Keep supporting the channel 😀
@lifewithlearn4830
@lifewithlearn4830 Ай бұрын
very helpful
@oussamaamireche1184
@oussamaamireche1184 Жыл бұрын
You are a life saver ❤
@kevinflorenzdaus
@kevinflorenzdaus Жыл бұрын
Well done! Kudos bro , Looking forward to your next video.
@Laratips
@Laratips Жыл бұрын
Thanks a ton. More coming. Keep supporting the channel.
@ashifali2817
@ashifali2817 5 ай бұрын
Thanks, you are sharing something different
@Viveksharmaa
@Viveksharmaa Жыл бұрын
Doing great man. Thanks for your efforts
@Laratips
@Laratips Жыл бұрын
Thanks. Keep supporting the channel 🙂
@arodro77
@arodro77 Жыл бұрын
Thank you!
@nazmulmys
@nazmulmys Жыл бұрын
Respect Brother
@nazmulhossain8297
@nazmulhossain8297 5 ай бұрын
very effective
@shaniwaqar5282
@shaniwaqar5282 Жыл бұрын
Useful information 🥰
@Laratips
@Laratips Жыл бұрын
Glad you liked it
@DevAmirull
@DevAmirull Жыл бұрын
hanks a lot
@rezwanhossainsajib4435
@rezwanhossainsajib4435 Жыл бұрын
Wonderfull tutorial . (I watch from first to last => I am the best person, right? 😆😆😁😁)
@mukeshvlogging
@mukeshvlogging Жыл бұрын
Love your vdo,, so informative, and i love my country nepal
@Laratips
@Laratips Жыл бұрын
Thank you 😊
@abdallakaram5376
@abdallakaram5376 Жыл бұрын
Very amazing bro
@Laratips
@Laratips Жыл бұрын
Thanks. Don't forget to like and subscribe 🙂
@ganeshyandigeri3492
@ganeshyandigeri3492 7 ай бұрын
Thanks for good vedio I learnt lot My question is public function subModel() { return $this->hasMany(subModel::class,'array of ids like [1,2]','id'); }
@codelaravel
@codelaravel Жыл бұрын
@aadsh10
@aadsh10 Жыл бұрын
👍🏼
@theJohnCode
@theJohnCode Жыл бұрын
Awesome 😎 video indeed. Please what extension are you using for your code suggestions and auto completion
@Laratips
@Laratips Жыл бұрын
Glad you liked the video. The extension name is PHP Intelephense
@theJohnCode
@theJohnCode Жыл бұрын
@@Laratips I have it but it doesn't give suggestions like yours 🥺
@rhejiearanez9951
@rhejiearanez9951 Жыл бұрын
I like your arrow style! is that an extension ?
@Laratips
@Laratips Жыл бұрын
No it's a font, jetbrains mono
@imrjat
@imrjat Жыл бұрын
Respect 🫡
Laravel Advanced - Making Laravel Collection Clone
20:12
Laratips
Рет қаралды 4,4 М.
Laravel Basics - Accessors, Mutators and Casting
20:30
Laratips
Рет қаралды 8 М.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,5 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 23 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 54 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Laravel Pivot Tables: Simple to Advanced Many-to-Many
12:24
Laravel Daily
Рет қаралды 118 М.
08 - Mail and Notifications
12:31
Laravel
Рет қаралды 51 М.
Laravel 11: Multi-Tenancy with Multiple Databases
8:23
Laravel Daily
Рет қаралды 14 М.
The Tools I Use to Build Products in Laravel
19:00
Josh Cirre
Рет қаралды 16 М.
5 Laravel Relationship Tips That You Might Not Know About
8:21
How to FETCH data from an API using JavaScript ↩️
14:17
Bro Code
Рет қаралды 99 М.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,5 МЛН