Laravel 9 Eloquent One to Many Relationship CRUD tutorial from scratch | belongsTo() & hasMany()

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • In this video, I have taught how to do One to Many Relationship CRUD opration tutorial in laravel from scratch with demo.
    I have taken an example of category and products to complete this one to many relationship crud in laravel with eloquent.
    Post - One to Many Relationship
    www.fundaofweb...
    Laravel 9 One to One Relationship CRUD
    • Laravel 9 one to one R...
    Laravel 9 One to Many Relationship CRUD
    • Laravel 9 Eloquent One...
    Buy me a coffee: www.buymeacoff...
    Follow us on Instagram: / funda_of_web_it
    Subscribe to my Hindi/Urdu Channel: / fundaofwebithindi

Комментарии • 25

  • @joshdevofficial
    @joshdevofficial Год назад +1

    Nice Eloquent and seo friend! Thank you for this wonderful tutorials of yours this would help a lot of aspiring Laravel Developers.

  • @suraiyaaysha6266
    @suraiyaaysha6266 Год назад +3

    It will be more helpful if you make more eloquent relationships tutorial like this video. It was very helpful. Can you please make more! like many to many and so on, thanks.

  • @marccaipheilunga7121
    @marccaipheilunga7121 2 года назад +3

    Thanks for the tutorial, it's amazing but it would be better to make use of laravel best practices: Route model binding, route names in the web route, route(' ') instead of url(' ') on the blade, creating migrations with models in a single command, to_route() function (laravel 9) in the controller instead of redirect(), mutator to slugify.

  • @skdeveloperspro
    @skdeveloperspro Год назад

    All your efforts are good but why are you not using decimal for price instead of int if your product needs precession?

  • @nielsofficeofficial9706
    @nielsofficeofficial9706 6 месяцев назад

    Thank you a lot Sir! : )))

  • @mauritole
    @mauritole Год назад

    Your example is simple, for beginners who start in the world of programming.
    Product, Category this is 1 relationship between 2 tables, but what happens if there are 3 or more tables??
    For example,
    Hospital Services
    Tables
    Users
    TypeUser (Admin, Secretary, customers)
    Patients
    Booking
    Doctors
    Medical Especiality
    Services (Food, Internet (WIFI), medical care, etc)
    Payments
    Table Users -> TypeUser
    Booking depends on
    ->Patients
    ->Services
    and
    ->Users
    Payments
    ->Customer
    ->Complete Doctor's services or medical care.
    Patients can also book an appointment with the doctor.
    If I want to modify a record from the booking table, I want to modify the status field of the booking table. Change the status from "pending confirmation" to "approved".
    How can I display the data from the tables Patients, Services, Doctors and Especiality in a form, depends on the record selected?

  • @suraiyaaysha6266
    @suraiyaaysha6266 Год назад

    Thanks a lot. It helps me a lot.

  • @mariamesangare1960
    @mariamesangare1960 Год назад

    Thanks for the tutorial

  • @ayeshniroshan2378
    @ayeshniroshan2378 11 месяцев назад +1

    thanks bro

  • @derrickdavid7960
    @derrickdavid7960 2 года назад

    please can you add images to your products? Because I tried to do it but as I don't put your variables, I can't do it. Please help me. Please....

  • @vireakron17
    @vireakron17 Год назад

    Please make a VDO for add products to category by postman

  • @kushkumarsoni3654
    @kushkumarsoni3654 2 года назад

    Sir also explain all relationship with crud

  • @hamzakouryani6522
    @hamzakouryani6522 Год назад

    please can someone help me to create a crud operation for 3 table like Materiels (materiel_id, materiel_code, quantity, marque_id, categoey_id) , Marque(marque_id, marque_name), Category(category_id, category_name) or something like this the purpos is to get 3 table like thas
    thanks a lot

  • @GamerBoy-fe3ey
    @GamerBoy-fe3ey Год назад

    Hello sir you haven't make a video on many to many relation

  • @sunilsa87
    @sunilsa87 2 года назад +1

    update products not works if user change category

  • @cana_369
    @cana_369 Год назад

    many to many with crud brother

  • @tomeramar2495
    @tomeramar2495 2 года назад

    Can you share the source code dash

  • @bernardchisumo4054
    @bernardchisumo4054 2 года назад

    thanks. Please share your github

  • @vireakron17
    @vireakron17 2 года назад

    please share your source code

  • @skdeveloperspro
    @skdeveloperspro Год назад

    All your efforts are good but why are you not using decimal for price instead of int if your product needs precession?

    • @joshdevofficial
      @joshdevofficial Год назад

      this is just a basic tutorial for its scope, not a crash course or anything you're looking for