Laravel Rest Api Tutorial for Beginners | Laravel Rest Api Tutorial

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

КОМЕНТАРІ • 37

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

    Create some timestamps while helping someone new to Laravel learn API creation. Hopefully helpful for others.
    0:18 create laravel project - laravelapitutorial
    1:20 create static route to student
    2:58 make:controller for StudentController
    4:08 implement index method for StudentController

    4:52 make:model (and -m migration) for Student
    5:18 edit migration file for students table
    5:44 set fillable columns in model file
    6:14 run migration

    6:32 view table in phpMyAdmin
    6:58 edit StudentController to add Student model and eloquent query to all

    9:18 retest student api in browser

    9:34 manually add data in student table using phpMyAdmin

    10:07 use Postman to example API results

    11:19 add POST method for student calling upload method (and using Validator)
    13:16 implement handler for if validation fails

    14:46 implement handler for success
    16:25 use Postman to test POST method for student API (shows debugging steps)

    18:28 building JSON to sent via POST in Postman

    19:10 using Postman to show validation failures

    19:42 using Postman to complete a valid POST

    19:57 using Postman to use GET method to see record was inserted successfully

    20:20 using phpMyAdmin to see raw data in database

    20:28 add one additional record in student via POST student api

    20:52 use GET request to ensure it was inserted properly
    21:05 add new route to edit data (PUT request, method name is edit)
    21:38 implement edit method in StudentController

    22:00 implement validation rules

    22:40 finding record to edit using eloquent
    23:15 testing edit method using Postman for record 1

    23:52 show validation failing
    25:03 show edit succeeding

    25:35 add new route to delete data (DELETE request, delete method)
    25:59 implement delete method in Student Controller

    27:31 testing delete method in Postman for record 3 (some debugging)

    28:37 using GET request to ensure it was deleted properly

  • @mdtauhidulislam2924
    @mdtauhidulislam2924 18 днів тому

    Love you vai...You are genious. clear speech, no unnecessary talking, breaked down every single part very nicely. Love you man...great job, carry on

  • @neoTriny
    @neoTriny 2 місяці тому +1

    To the point, no garbage talking. Thanks man ❤🎉

  • @lancewilliamcatal6870
    @lancewilliamcatal6870 9 місяців тому +3

    Super clear and super straightforward. Thanks for this API tutorial!

  • @horizon6309
    @horizon6309 10 місяців тому +1

    Thank you, Great tutorial 👍 Taught me the basics of building a simple API in Laravel.

  • @RyanKuy-t4c
    @RyanKuy-t4c 9 місяців тому +1

    Wow! That's friggin awesome! Can you make a part 2 for this a continuation of this tutorial but with authentication like sanctum or passport? Thank you so much! Subscribed!

  • @mayankpant64
    @mayankpant64 6 місяців тому +1

    Thank You . Understood very well 🙌

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

    Thank you sir. Very clear and well undersrood

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

    I love the way you say John Doe

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

    good explanation sir

  • @Almassa-jt2sv
    @Almassa-jt2sv 10 місяців тому

    thank you, it helped me a lot

  • @uros.u.novakovic
    @uros.u.novakovic 11 місяців тому

    A very helpful tutorial for beginners. Thank you!

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

      Thank you for your kind words! I'm happy to know that the tutorial was helpful for you.

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

    great video 😊😊

  • @celotrovi
    @celotrovi 7 місяців тому +1

    How to add some sort of api keys authorization system for external entities that are not users of the application?

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

    Thank you so much brother

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

    thank u sir for this tutorial

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

    you explained well sir

  • @SAB-TECH_HUB
    @SAB-TECH_HUB 2 місяці тому

    please can you make a tutorial on using Sactum for api token generation ?

  • @riyazmohamed6532
    @riyazmohamed6532 7 місяців тому +1

    super

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

    When I create a new laravel project, my routes folder does not contain an api.php file. Does anyone know why that might be the case?

  • @AkhileshYadav-lv3kh
    @AkhileshYadav-lv3kh Рік тому

    Thank you sir 👍👍

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

    can you show a tutorial api auth from laravel? to use it in react or vue.js

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

    can i use resource full controller

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

    thanks man

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

    AWESOME! Thank you!

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

    How can I get it thru javascript?

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

    ❤ good work

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

    osm

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

    This is helpful

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

    I needed English subtitles :/ - overall a decent tutorial for a basic introduction. Please though - do not use this code in production. It is very bad.

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

      Well it is only to show the basics of api for beginners but thanks for the advice

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

    good explanation sir