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

Поділитися
Вставка
  • Опубліковано 25 сер 2024

КОМЕНТАРІ • 251

  • @nelsonbaluyot6882
    @nelsonbaluyot6882 Рік тому +32

    Dude this is the best turorial I've watched so far

  • @stevehoober3712
    @stevehoober3712 Рік тому +8

    Coming from MERN, this was the best video I needed to grasp everything. Thanks lot Jeremy

  • @nikalairom
    @nikalairom Рік тому +24

    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!

  • @locrien8888
    @locrien8888 4 місяці тому +3

    Please note for non-windows users you must use a forward slash rather than a backslash when using artisan make:resource folder/resourcename

  • @HTDChannel
    @HTDChannel Рік тому +10

    This is one of the greatest tutorials of all time, exactly what you need to know no extra bs

  • @themindfulway876
    @themindfulway876 4 місяці тому +3

    This guy sounds like a mix between documentary and a flight instructor. Awesome

    • @dieudonneoutchi8500
      @dieudonneoutchi8500 4 місяці тому

      Exactly 😆!! that's crazy man !! I really appreciated ... Thk you

  • @MrFixIt-le7rs
    @MrFixIt-le7rs Рік тому +3

    Best Tutor, his teaching way gives you confident to start any project.

  • @saiful-here
    @saiful-here 9 місяців тому +3

    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.

  • @al-morshedtours2161
    @al-morshedtours2161 7 місяців тому +2

    Mindblowing , the way how he illustrate and explain things

  • @juanchongo77
    @juanchongo77 9 місяців тому +2

    It is the best course i've never seen, Thank u so much!. Greetings from Venezuela

  • @DiogoGaming2
    @DiogoGaming2 5 місяців тому +1

    One of the best tutorials ever, you should make a lot more, very well explained and clear to understand

  • @oguzhansisman9322
    @oguzhansisman9322 Рік тому +1

    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!

  • @mktNo1
    @mktNo1 Рік тому +2

    I hadn't done with Laravel for a long time. It's really helpful. Thank you for your video.

  • @gorilla8526
    @gorilla8526 3 місяці тому

    由浅入深,由表及里,层层递进。非常值得推荐的Laravel视频!👍

  • @mayboyx
    @mayboyx 3 місяці тому +1

    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

  • @techloading3217
    @techloading3217 5 місяців тому +1

    Best tutorial ever watched. keep it up. love your work.

  • @dotdotdotdotdash
    @dotdotdotdotdash Рік тому +1

    This video saved my life, props to the guy 👊👊

  • @alnamaaengineering2731
    @alnamaaengineering2731 2 роки тому +2

    can't recommend your tutorial enough, thanks a lot

  • @mackshonayi943
    @mackshonayi943 5 місяців тому

    This is a great course, excellent teacher. Very clear explanations!

  • @hgrafa
    @hgrafa 4 місяці тому

    Best and clear tutorial so far!

  • @bhardwaj_abhi3421
    @bhardwaj_abhi3421 Рік тому +1

    one of the best video on rest api

  • @kurdev101
    @kurdev101 8 місяців тому

    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.

  • @ilyesmilyesm2576
    @ilyesmilyesm2576 5 місяців тому

    best tutorial in planet earth, period

  • @hectormendez6305
    @hectormendez6305 5 місяців тому

    gran video me ayudo a comprender demasiado varias partes del framework laravel y de la implementacion de sanctum

  • @aribiali3574
    @aribiali3574 2 роки тому +8

    Would u make a tutorial about react +laravel +authontification and thnx❤

  • @apnachannal9129
    @apnachannal9129 Рік тому +1

    BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!

  • @artisciencedev1203
    @artisciencedev1203 6 місяців тому

    We love you Envato Tuts developer!

  • @matmitcheilando7266
    @matmitcheilando7266 6 місяців тому

    It helps me a lot more than anything so far....
    Thank you sensei

  • @remanonet7044
    @remanonet7044 10 місяців тому

    Many Thanks, It was a pleasure to follow you in this tutorial

  • @ITDevelopmentCafe
    @ITDevelopmentCafe 11 місяців тому +1

    Thank you for the very efficient course that you have explained in the simplest possible way.

  • @SaqibNaeem-ob7gp
    @SaqibNaeem-ob7gp 5 місяців тому

    Amazing tutorial.
    One-in-all.
    Thanks Envato

  • @ousssika5359
    @ousssika5359 7 місяців тому

    tanks for this tuto , i was abel to start my journy with laravel ,thanks a lot

  • @Hexdy
    @Hexdy Рік тому +1

    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!

  • @alfatech924
    @alfatech924 2 роки тому

    Great envato tuts team we are waiting for this course premiere ...

  • @medtalks6146
    @medtalks6146 9 місяців тому +2

    hey , from where the hasInvoices() in the seeder came from does laravel know it automatically?

    • @collectorX
      @collectorX 11 днів тому

      yes due to the naming convention, laravel auto detects and does its magic. ofcoz the relationships have to be built

  • @phpisdead
    @phpisdead 2 роки тому +2

    Thank you , next laravel and vue project please

  • @marktheunknown1829
    @marktheunknown1829 4 місяці тому

    Thank you very much, I enjoyed a lot

  • @Almursalat.
    @Almursalat. Рік тому +1

    very talented teacher - cheers

  • @bhedabipin9246
    @bhedabipin9246 Рік тому

    I got everything I needed to know in this one video. Thank you!!

  • @franciscoastoreca3110
    @franciscoastoreca3110 4 місяці тому

    I love your voice for learning

  • @gillesashley9314
    @gillesashley9314 Рік тому +3

    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.

  • @dachshund_jow
    @dachshund_jow 2 роки тому +3

    19:22 if don't see Route's data, to be seen 404 not found, Enter command "php artisan serve" in your project folder.

  • @rescatado182
    @rescatado182 Рік тому

    Great tutorials for thinking in advanced tips on build stronger API's. One thing, I come from LATAM, so my keyboard too, and my "not equal" symbol that it works is this: '!='

  • @reksihu
    @reksihu 3 місяці тому

    Thank you for this video!

  • @delvinnj-vh7gf
    @delvinnj-vh7gf 2 місяці тому

    Nice course, Could please make a video about graphQL in Laravel ?

  • @ruzindanajules7040
    @ruzindanajules7040 2 роки тому +4

    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

  • @borakayalar
    @borakayalar 8 місяців тому

    Perfect course! Many Thanks

  • @azad_agi
    @azad_agi Рік тому +1

    Amazing Tutorial , Thank you so much

  • @flaterptech
    @flaterptech Рік тому

    Thank You for this course, Its really helps, More knowledge to your brain bro

  • @NeilMyatt
    @NeilMyatt Місяць тому

    This is great but needs updating for Laravel 11.x - maybe just adding some notes in the description would be enough to help people. There are quite a few changes mean that following this tutorial won't work for a lot of people. Most notably that api routes are not installed OOB anymore, so you need to need to run php artisan install:api

  • @kosticnemanja1914
    @kosticnemanja1914 Рік тому +1

    in my humble opinion, your voice is better than Morgan Freeman

  • @madaminmj8462
    @madaminmj8462 Рік тому

    trust me , this is better even paid course

  • @jlemuelDev
    @jlemuelDev 4 місяці тому

    hope this have a frontend react implementation and using this api's

  • @ousssika5359
    @ousssika5359 Рік тому +4

    $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 Рік тому +1

      Instantiate variable $user like this:
      $user = User::where('email', $credentials['email'])->first();
      It will return App\Models\User instance, which should have HasApiTokens trait.

  • @iambsquare
    @iambsquare 2 роки тому

    I love this, havan't come across this kind of tutorial (Very understandable)

  • @malikimoustapha4061
    @malikimoustapha4061 2 місяці тому

    thank for this valuable tuto, My question is there another tuto example that shows how to consume thise rest API?

  • @benjaminvenezia1944
    @benjaminvenezia1944 Рік тому +2

    A great tutorial to follow with senior developer tips, this is really excellent! ♥🍻

  • @nocopyrightmusic-kt8gv
    @nocopyrightmusic-kt8gv Рік тому

    Thank you for explaining this thoroughly!

  • @covermaker8748
    @covermaker8748 Рік тому +2

    Great course! I've learned a lot from you, thank you. For the bulk insert section, you could consider moving the logic for removing the 'customerId', 'billedDate', and 'paidDate' data from the controller to a protected function called 'passedValidation' in the BulkStoreInvoiceRequest.php . What do you think?
    So it would look like this:
    protected function passedValidation(){
    $data = collect($this->toArray())->map(function($arr, $key){
    return Arr::except($arr, ['customerId','billedDate', 'paidDate']);
    })->toArray();
    $this->merge($data);
    }

  • @muhammadumarsotvoldiev8768
    @muhammadumarsotvoldiev8768 7 місяців тому

    Thank you very much! Very helpful

  • @pramodsawant9687
    @pramodsawant9687 Рік тому

    One of the great video I have seen 💓I loved your voice 💓

  • @davidedema8240
    @davidedema8240 Рік тому

    Wow. this is so easy to understand.

  • @andrewmedvedev963
    @andrewmedvedev963 Рік тому

    Wow thank you. Great tutorial. A lot of valuable information was given.

  • @juancamilovallejos8328
    @juancamilovallejos8328 11 місяців тому

    Very good and useful tutorial Thanks!

  • @Maen963
    @Maen963 Рік тому

    i wish my like button turns into 1000 likes button !
    what a PRO tutorial

  • @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.

  • @chulopapi812
    @chulopapi812 8 місяців тому

    Thank you for the tutorial. I will look out for you other tutorials. Loved it

  • @JakubAdamus1991
    @JakubAdamus1991 8 місяців тому

    Great video, thanks a lot!

  • @IVOMOTV1986
    @IVOMOTV1986 2 роки тому

    Looks a great course

  • @kurosshyu2621
    @kurosshyu2621 11 місяців тому

    thank you and it's a great tut

  • @NaughtyGFY
    @NaughtyGFY 7 місяців тому

    Not often Lewis Black narrates a Laravel course :)

  • @alexandruaxentioi3006
    @alexandruaxentioi3006 11 місяців тому

    Amazing course

  • @aatifbangash
    @aatifbangash Рік тому

    Best of the best tutorial

  • @lassestube
    @lassestube 8 місяців тому

    Query builder has a when method instead of using if else

  • @vezzel1113
    @vezzel1113 9 місяців тому

    could you make a more advanced tutorial this tutorial was really good.I learnt alot

  • @zabiremu
    @zabiremu 6 місяців тому

    Great course for bro

  • @christiansosa5484
    @christiansosa5484 Рік тому

    Thanks so much! rly great video and work. Much appreciated

  • @vadimgerich9887
    @vadimgerich9887 Рік тому

    fantastic video thank you so much 😍

  • @locrien8888
    @locrien8888 4 місяці тому

    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?

  • @paollarce5137
    @paollarce5137 Рік тому +1

    What extension for VSC are you using ?

  • @aberindonximmond1231
    @aberindonximmond1231 Рік тому

    This was so helpful!! Thank you

  • @jamesschneider8677
    @jamesschneider8677 Рік тому

    Excellent job! Thanks for sharing your thought process and for including versioning and auth.

  • @mustafahassan9383
    @mustafahassan9383 Рік тому +1

    Bad Method Call: Did you mean App\Models\customer::invoice() ?
    it gives me this error

  • @bruhisbruh000
    @bruhisbruh000 11 місяців тому +1

    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

  • @ahmedmahmoodhameed2585
    @ahmedmahmoodhameed2585 3 місяці тому

    Great course. Is there a GitHub repository for this course?

  • @CliveStewart-bq3od
    @CliveStewart-bq3od 4 місяці тому

    Do you have a tutorial that shows how to create a laravel app that consume these api?

  • @satishbangleshyd
    @satishbangleshyd Рік тому

    cool tutorial, 100% works, +rep

  • @firefox0503
    @firefox0503 Рік тому

    You are the best!

  • @ycheing
    @ycheing Рік тому

    very good tutorial, thanks

  • @traviswilliams9225
    @traviswilliams9225 Рік тому

    I used to hate on laravel but now ive seen the light

  • @emilebaelde
    @emilebaelde Рік тому +4

    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.

  • @iamkeir
    @iamkeir Рік тому +1

    Absolutely fantastic tutorial, thank you!!

  • @matthewlee-mu2kq
    @matthewlee-mu2kq 3 місяці тому

    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

  • @TheKennyWorld
    @TheKennyWorld Рік тому +1

    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 7 місяців тому

      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()

  • @eugaleksandr
    @eugaleksandr 10 місяців тому

    Thanks for the video, very useful course!
    I have a small question, at 30:50 in the response results the current_page and last_page are not written in the Camel case, how can I fix this? I understand that Laravel returns this automatically, but I still want to put things in order.

  • @birsingh5388
    @birsingh5388 2 роки тому

    Wow, going to watch this and will try to implement as well. Thank you guys ☺️

  • @DigitalHelpVault
    @DigitalHelpVault Рік тому +1

    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 Рік тому +1

      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.

  • @thetheedesk
    @thetheedesk 3 місяці тому

    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)

  • @fahimtalukdar3071
    @fahimtalukdar3071 Рік тому

    I am facing a problem. The problem is when I give a filter parameter in string for example city[eq]=washington, it doesn't give any data but if I give parameter in number for example amount[eq]=3000 then it's working and another problem only lt,gt,eq is working for me, other's don't. How can I remove this problem?. please give me the solution.

  • @petersparks6954
    @petersparks6954 Рік тому +1

    Anyone know if this works on Laravel 9 & PHP 8?
    I keep getting 404 on my routes /api/v1/customers ? Thanks