Laravel 8 REST API With Sanctum Authentication

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 879

  • @ruzhdihaxhiu3451
    @ruzhdihaxhiu3451 3 роки тому +518

    We all here agree that we need more tuts for Laravel from you Brad.

  • @mouradeljayi584
    @mouradeljayi584 3 роки тому +347

    We really need more tutorials about Laravel !
    Thank you Brad

    • @kegklaus5069
      @kegklaus5069 3 роки тому +10

      Agreed!

    • @gomo5628
      @gomo5628 3 роки тому +1

      theres old course by Brad on Eduonix, but is about Laravel 6 if I recall good. However I honestly hope, to see up to date course on Laravel by Brad on Udemy, and maybe advanced edition on the OOP PHP MVC Course as well, please :)

    • @daviddantefrank
      @daviddantefrank 3 роки тому

      Agreed!

    • @patricksantino4131
      @patricksantino4131 3 роки тому

      His js is also good if not better than his php

    • @CODINGISEASY
      @CODINGISEASY 3 роки тому +1

      I got some

  • @jareerzeenam8200
    @jareerzeenam8200 3 роки тому +41

    Omg, Thank you so much Brad. Your Previous Laravel video (lsapp) was my first ever laravel course in my life and it changed a lot in my life. Now i'm working as a Laravel Backend developer in a reputed company. Thank you so much again. You have been a role model in my life ❤️

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

      what is his full name please, he did not even mention it at the beginning of the tutorial

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

    I got an interview for a API developer job next week, the company's stack is Laravel. This is the most useful video I have seen in a long time. Thank you so much

    • @Peter-ue4iz
      @Peter-ue4iz 2 роки тому

      did you get the job? if not, I have more work for you and looking for a laravel expert to build an API.

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

      @@Peter-ue4iz I didn't get that job, but I got an offer from another company.

  • @maazktk2755
    @maazktk2755 3 роки тому +43

    Waiting so long for your own laravel content. Thank you so much 😍

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

    I quit watching your videos online, now i only give it a like then download it, so that i can go back an forth, and get the whole value. Just finshed laravel crash course yesterday, and i really appreciate what you are giving us *for free*, brad is truly a valuable resource.

  • @Kader-su8jr
    @Kader-su8jr 3 роки тому +87

    This is exactly what i wanted😮 and boom I got a Traversy Media video🔥

    • @Andbil
      @Andbil 3 роки тому +4

      You must have missed his video on machine learning to predict user demands for video platforms ;)

    • @wojciechmruk3539
      @wojciechmruk3539 3 роки тому

      Same here. I've just finished API on Lumen but it's always good to check Traversy :)

    • @MULTICODE
      @MULTICODE 3 роки тому

      @@wojciechmruk3539 links please

    • @bra5081
      @bra5081 3 роки тому

      Me too lol

    • @wojciechmruk3539
      @wojciechmruk3539 3 роки тому

      @@MULTICODE That's an internal project for the company :/ I can't share.

  • @mounirmoutawakil1078
    @mounirmoutawakil1078 3 роки тому +46

    finally some laravel stuff !

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

    You and Mosh are the greatest code Instructors on UA-cam who make very difficult and blurry things very simple and crystal clear. Love the way you teach. You aren't wasting a single minute in unrelated things. Whenever you bring something, you always come up with something solid.

  • @stefans1066
    @stefans1066 3 роки тому +16

    Awesome content and I think it is very likeable that you don't try to cover up or cut out any mistakes / typos etc. because that keeps it so authentic. Thanks for the effort man, much appreciated 👍

  • @Vasmir5
    @Vasmir5 3 роки тому +32

    If possible please make a react front end for Laravel. This is a nice combination that is not seen often.
    Naturally, thank you for for all the videos you provide. They are immense help.

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

      Agreed! Front-end react + redux (with TypeScript offcourse) and back-end: Laravel and whatever db.
      By the way thx a lot Brad! Your content is life changer for me.

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

      This would be cool

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

      MLR Stack (MongoDB Laravel React)

  • @kiplanget
    @kiplanget 3 роки тому +1

    I got a job as a php/laravel developer after watching your videos. Gudos bro. Love your teaching steps.

  • @SiddharthBhansali
    @SiddharthBhansali 3 роки тому +1

    Doesn't matter how many channels I go through, in the end Brad's videos are the ones I understand the best. Thank you, great video!

  • @s-sugoi835
    @s-sugoi835 3 роки тому +3

    Hands down, the only tutorial that worked out for me. It was laughing so hard towards the end but I learned a lot from this. More power to you Brad!

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

    Seriously the quality of your content is beyond insane. I have not gotten this level of education during my whole time on the university. How the possibility of learning something new has improved within the last 15 years... It always blows my mind.

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

    Oh my, I really love the way you taught this... simple, straight forward, organized and calm. Amazing Thanks Brad !

  • @Anothy
    @Anothy 2 роки тому +1

    Awesome tutorial, dude! I went from having never touched Laravel to being confident enough to make an API with authentication.

  • @santysasa12
    @santysasa12 3 роки тому +5

    Great teacher! You go straight to the point, you explain in a easy way to understand, you take your time to explain the details of what you are doing. Keep up the good work!
    Edit: I found the video, and thought this was your channel. I don't know if you have a channel of your own already, explaining code, laravel or other stuff, but you really should.

  • @abderrahimlahyani3093
    @abderrahimlahyani3093 3 роки тому +7

    A Laravel tutorial with Microservices Architecture would be greaaaat!!! Thank you!

    • @joshuajackson8973
      @joshuajackson8973 3 роки тому

      Just create several apis that split down the domain content

  • @gamedevsa
    @gamedevsa 3 роки тому

    I cannot believe that you record these tutorial in real time and pretty much perfect. Anyone that has tried this knows how impressive that is. Thanks.

  • @mirodil.kamilov
    @mirodil.kamilov 3 роки тому +2

    After learning most of the basics of Laravel, I have recently started thinking about APIs (which is not so much content indeed). So, it was right to time with the right context for me. Thank you, Brad!

    • @marcolancellotti8114
      @marcolancellotti8114 3 роки тому +1

      Just a little tip! In the video Brad uses the resource to handle CRUD apis in both Controller generation and Routing but there is actually a better method: using the apiResource instead of resource will not generate the routes and methods for the view parts which in API case are pretty uselless :)

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

    you can use the exists instead of the first method. This is how you avoid unnecessary inquiries. The request is terminated immediately if not found.
    Is a good tutorial

  • @drjonbear7517
    @drjonbear7517 3 роки тому

    I just want to put it out there that today I was tasked with creating a REST API in Laravel. Never done it before. Exquisite timing as usual!

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

    Give this guy a medal! Thanks a lot Brad. Your videos are incredibly helpful. I just wish I could ask you some questions as I watch. Thankfully, you explain things well enough for me to just pause the vid, go research and come back with the knowledge I need. Keep up the good work man!

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

    I do agree with others, Laravel tutorials are really needed.
    Thank you very much Brad.... You are helping us in a way that is not possible to say it by words.
    You are a HERO in our hearts BRAD.
    I LOVE YOUR WORK

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

    Mr Traversy is one of the best teacher, explaining each and every line of code makes learning so much easier. Thanks for such quality content.

  • @behzodjon
    @behzodjon 3 роки тому +3

    Finally! Laravel!! We've been waiting so long!!!!!!!!!!!!! Please , make videos about Laravel more!!!!!!!!!!!!!

  • @qofi_1
    @qofi_1 3 роки тому +1

    I have been thinking about this for a few days now. This guy can read minds. Thanks man

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

    Brad, I always learn something good and new whenever I watch your tutorials in the easiest and simple way. Thanks

  • @ush6939
    @ush6939 3 роки тому

    bro this is so insane , i started watching ur 2019 or 2018 laravel series , im on part 9 right now i was willing to watch some other tutoriels after i was finished with yours and now boom u put a laravel video out of nowhere , thank you so much for your time

  • @mcson87
    @mcson87 3 роки тому

    Thanks Brad. I've been a web developer for two years now because of your tutorials. Thanks cheers...

  • @fahimanzam7015
    @fahimanzam7015 3 роки тому +6

    Finally Laravel from you. Need a complete advance course.

  • @Noone-1980
    @Noone-1980 3 роки тому

    Thank you!!!!! Finally!!!!!!!!! I stopped for months because I got pissed off. Not enough tutorial on UA-cam for Laravel. Especially SPA with Sanctum. Now I can move forward again. Thanks Brad!

  • @sayeedmahmudsaad7535
    @sayeedmahmudsaad7535 3 роки тому +1

    I was searching to set the unique token authentication for 6 months now I found Brads video. That was really helpful. I request you to make a quick crash course on Laravel 8. I saw your previous series but it's not updated. So, Hopefully We'll get the latest laravel tutorial series from you. Thanks for everything you give us.

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

    Compared to other tutorials, I think this is the only tutorial that is simple and very clear. Thank you so much brad

  • @kabiryusufbashir
    @kabiryusufbashir 3 роки тому

    "I might forget to use semicolon in one place or the other because I don't used it anymore in javascript"
    He actually never forget one throughout the tutorial. Thanks brads 😀

  • @gilangrama7039
    @gilangrama7039 3 роки тому +7

    This is exactly why I need it right now for my college task.

    • @dev9033
      @dev9033 3 роки тому

      semang cuk

  • @atifanees4844
    @atifanees4844 3 роки тому +1

    Finally some laravel content .
    Hey Brad why don't you consider making a series to teach laravel in depth .

  • @rcoonghost
    @rcoonghost 3 роки тому +5

    Thank you very much, Brad, for this video and for others such as javascript, react and react-native. Those have been the ones I've watched and I really like your teaching style and the pacing of the videos. Thanks to you I might actually pass my internship yet :D

  • @gtechlabs7
    @gtechlabs7 3 роки тому +1

    I have been waiting for it, since I watched your "10 projects with Laravel back in the days on Eduonix". Thanks

  • @nabeelyousafpasha
    @nabeelyousafpasha 3 роки тому

    Respect from Pakistan 🇵🇰
    I do remember when I started Laravel, watching your Crash Course back in 2017

  • @mahdighasemi9008
    @mahdighasemi9008 3 роки тому +1

    It was nice as ever, thank.
    At 32:17 we doesn't need that middleware, that is for SPA and stateful requests , I think

  • @djaouidakharchi4024
    @djaouidakharchi4024 3 роки тому

    I learned more in an hour than a month at my actual school. Thank you Brad.

  • @FunctionGermany
    @FunctionGermany 3 роки тому

    you saved my life, this is exactly what i need for my software engineering final exam project ♥
    i couldn't figure out how to do custom auth + SPA/API in laravel before i watched this.
    THANK YOU SO MUCH!

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

    This is ALL the video I NEEDED to get started! I owe you a lot, Brad!!

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

    this is one of the best laravel tuts i ever watched dude, congrats!!

  • @maksymdudyk1718
    @maksymdudyk1718 3 роки тому +1

    Awesome, Brad. I admire your magic ability to publish tuts on hot topics.

  • @chiar995
    @chiar995 3 роки тому

    yesterday I was checking the channel for laravel projects, what a great time!

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

    Beginning of Blue from Eiffel 65 at 31:41
    Thank you very much for the tutorial !

  • @rimialfarwan2397
    @rimialfarwan2397 3 роки тому +5

    Thank you so much Brad, you are always amazing!. just a side note, we can use Route::apiResource instead of Route::resource in the route. also if you type hint the parameters in the update/delete methods with the model class, Eloquent will automatically fetch the object for you ;)

    • @MG-wx8yx
      @MG-wx8yx 3 роки тому

      He is not using resource class I think that's why he didn't use Route::apiResource(), I guess that's the reason. I always use resource class and then use apiResource in all my route resources in api.php file.

  • @LoveLiveAndCode
    @LoveLiveAndCode 3 роки тому

    Its Been So long since your first PHP Laravel Tuts...
    Thanks Alot Brad

  • @aris.konstantinidis
    @aris.konstantinidis 10 місяців тому

    Thank you so much for your content. You have been such a great inspiration for me. I still remember the first video I saw from you on how to deploy a simple node.js app. Now, 3 dev jobs and on cs degree later, I still come back to your channel for tips and tricks! :) keep on!

  • @mooder3247
    @mooder3247 3 роки тому +23

    Waiting for react + laravel tut 😍

  • @Doomslayer420
    @Doomslayer420 3 роки тому +3

    Another Legendary Lesson From A Legendary Teacher ❤️

  • @tusharmalik7949
    @tusharmalik7949 3 роки тому +1

    Man , u r perfect to explain everything crystal clear

  • @zeryez6347
    @zeryez6347 3 роки тому

    Really Great Video had no idea at all about php and Laravel but thanks to you I feel little more safe around this language now and you're the first guy I really enjoyed listening to 1h without wanting to stop the video thank you very very much. Keep up the good work you're doing a great job

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

    after installing sanctum and following your video, locked me out of my index and stuffed my backend! Thanks 4 the tut mate!

  • @mouridamine3237
    @mouridamine3237 3 роки тому

    who feel happy when he see brad explain laravel 8

  • @__kawaii
    @__kawaii 3 роки тому

    This is best Laravel tutorial channel. Thank you so much. You're just genius..

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

    Amazing tutorial. Laravel should be more popular.

  • @SimDiok
    @SimDiok 3 роки тому

    so glad to finally see my virtual mentor! thanks Brad!

  • @gmfer9604
    @gmfer9604 3 роки тому

    Excellent video, helped me a lot to understand quickly about Sanctum API and got my development running in no time.

  • @nikulasoskarsson5472
    @nikulasoskarsson5472 3 роки тому +17

    Really happy seeing this one! Do you have any plans to do more Laravel / PHP soon Brad? :)

  • @nivus97
    @nivus97 3 роки тому +4

    Eres realmente muy bueno, te felicito, preciso y puntual, sin duda alguna debería haber mas tutoriales como los tuyos. Además lo explicas de una manera muy buena para poder despegar un proyecto base, saludos desde México.

  • @bikourneabdelmoula9082
    @bikourneabdelmoula9082 3 роки тому

    i really like the way you make things look easy ! You're the best Brad ! Keep going !

  • @yiyoascen
    @yiyoascen 3 роки тому

    your content ALWAYS helps. You're a great guy Traversy Media

  • @saahiththiyanmathivathanan7135
    @saahiththiyanmathivathanan7135 3 роки тому

    I wouldn't be having a career if not for this guy.

  • @АндрейМарьин-Островский

    Great thanks, bro! I have been struggling with Sanctum for more than 6 hours. Couldn’t sent correct request to protected route. There is no nothing about you need put token in authorization in documentation and other videos. Great respect!

  • @syntaxerron4333
    @syntaxerron4333 3 роки тому +3

    Thank you sir BRad for this. More Laravel Tutorials please.

  • @dahsin9812
    @dahsin9812 3 роки тому

    You uploading so many new vids, that now I wanna learn everything!! My man!!

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

    Your teaching style is amazing.

  • @daniellaerachannel
    @daniellaerachannel 3 роки тому +8

    first Mr Traversy! you're a legend!

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

    Thank you for the hard work put into this video. A tutorial with a FrontEnd connected to this API would be really useful.

  • @Bjokac
    @Bjokac 3 роки тому

    This tutorial is of excellent quality and has guided a fellow student and myself on our first steps with laravel's authentication. Thank you very much.

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

    I love these tutorials. Always easy to watch, follow and understand. Thanks Brad. Oh, and I agree with the previous comment...more 🙂

  • @bogdanlupu3679
    @bogdanlupu3679 3 роки тому

    Thank you Brad. I like laravel. The truth is I have a project ongoing and this helps me a lot (as always your tuts ar short and point on. No side chit chat) .

  • @darrennienaber6488
    @darrennienaber6488 3 роки тому

    Hey Brad, just got started on Laravel, this was awesome! Thank you.

  • @khalifmahdi
    @khalifmahdi 3 роки тому

    It's always nice to see your videos, specially when you are there at the corner!:) Stay safe!

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

    I just watched your tutorial and it really helped me understand Laravel. Thank you for sharing your knowledge!

  • @yaseenlakhdhar6090
    @yaseenlakhdhar6090 3 роки тому

    Legend

  • @rdwanbzzaze1813
    @rdwanbzzaze1813 3 роки тому

    thank you very much We really need more tutorials about Laravel !
    Thank you Brad

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

    This tutorial helped me A LOT! Now the next part of my headless journey.

  • @zaidh41
    @zaidh41 3 роки тому +3

    hey, brad loves your work and your tutorials help me a lot in my development carrier. please do a full website development course using laravel and please let us know when you are planning to live your nextjs course

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

    Brad Traversy you are one hell of a person

  • @ПавелКовчин
    @ПавелКовчин 3 роки тому

    As always, it is very easy to understand. Thanks Brad.
    Health to you man.

  • @bra5081
    @bra5081 3 роки тому

    I like this kind of tutorial, simple, efficient, straight to the point and practical.

  • @liteninkiran
    @liteninkiran 3 роки тому

    This is a really good course. I always love Brad's courses and this is another great one.

  • @GarronArgentina
    @GarronArgentina 3 роки тому

    I am happy to see you again rolling making videos!! welcome back!

  • @pongpitisripolpaew6979
    @pongpitisripolpaew6979 3 роки тому

    Love your training videos. Thank you so much Brad from Thailand!

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

    Very helpful in understanding Laravel auth sanctum! Thank you so much Brad!

  • @risteltechnologies7778
    @risteltechnologies7778 3 роки тому

    The way u explained the things is just awesome....

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

    Just finished another great topic from brad, you are soo helpful

  • @arifmammadov5588
    @arifmammadov5588 3 роки тому

    Every time you read my mind and publish the tutorial that I need. Huge thanks and respect to you :)

  • @jonas76921
    @jonas76921 3 роки тому

    For anyone having the same issue, at 45:40 vscode told me that tokens() didn't exist.
    I changed the code from:
    auth()->user()->tokens()->delete();
    To:
    $request->user()->tokens()->delete();
    And that fixed it.

  • @moh.dah.familay
    @moh.dah.familay Рік тому

    Thank you very much ..
    You are a great teacher and your way of explaining is amazing.
    I have been researching this topic for more than 4 months, and I only understood it through you. Thank you very much
    🤩

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

    Another great tutorial by Brad! I can't say thank you enough!

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

    Very accessible tutorial on token-based authentication. Thank you!

  • @ImranKhan-ft7ns
    @ImranKhan-ft7ns Рік тому

    Thank you Brad.. This video helped me gettting started in laravel.. Love from Pakistan

  • @Venezuelangel
    @Venezuelangel 3 роки тому

    Brad, at around the 11:00 mark, you typed in the Product model to be imported.
    You can actually download an extension called 'Namespace resolver' or something like that, and you can code with whatever classes you want, then right-click on the class, select "Import Class" from the context menu, and it will automatically do what you did by hand.
    Thank you so much. I wish we could have statistics of how many people you help get better jobs and improve our quality of life. God bless you, or Tesla bless you if you're an atheist.

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

    For Laravel 9 users: If the auth()->tokens()->delete(); provides an error then try using : $accessToken = $request->bearerToken();
    $token = PersonalAccessToken::findToken($accessToken);
    $token->delete();