Controllers In Laravel | Learn Laravel From Scratch | Laravel For Beginners

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024
  • This video will show you how you could create and use Controllers in Laravel - Learn one of the most popular PHP frameworks for its advanced features, templating engine, fast commands and security.
    📚 New Udemy Course
    If you're looking to level up your Laravel skills, my new course "Udemy Migirations, Seeders, Factories, Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: www.udemy.com/...
    📲 Let’s plan a meeting
    Plan a (paid) 1-hour meeting on Calendly to do portfolio reviews, code reviews resume reviews or a coaching session for Laravel. Please read the description before booking: calendly.com/c...
    💌 Newsletter
    Sign up for my free weekly email newsletter: www.newsletter...
    🔥 Resources
    PHP Hosting (10% DISCOUNT): www.hostinger....
    TikTok: / codewithdary
    Instagram: / codewithdary
    Twitter: / codewithdary
    Blog: blog.codewithd...
    Newsletter: newsletter.cod...
    Patreon: www.patreon.co...
    GitHub: github.com/cod...
    Want to learn more?
    Courses: / @codewithdary
    #laravel #laravel8 #php #controllers

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

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

    LETS CONNECT THROUGH INSTAGRAM.
    instagram.com/codewithdary

  • @davidfranklin63
    @davidfranklin63 3 года назад +10

    Having gone through PHP, OOP, MVC and now Laravel, I am soooo pleased to find your channel - it is excellent and very much needed!
    There's so much content about Laravel but most of it is years' old and totally out of date in methods, syntax and structure.
    Thanks for the excellent tutorials so far - please keep up the good work!

    • @OnlyJavascript
      @OnlyJavascript 3 года назад

      He is really awesome man.

    • @codewithdary
      @codewithdary  3 года назад

      Can't thank you enough David! Keep me updated if a certain Laravel topic of missing :)

    • @codewithdary
      @codewithdary  3 года назад

      My man! :)

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

    I'm so lucky that I finally found a tutorial that makes it easier to understand Laravel 8. Thank you so much sir Dary! Kudos! :)

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

      Love the positivity Adrian, thank you!

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

    Couldn’t be explained better👏

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

    Thanks for the videos. I really like how you show multiple ways of accomplishing the task.

    • @codewithdary
      @codewithdary  3 года назад +1

      Thanks Man. I’ll do it because whenever you google issues, you might see a solution in a different way and I don’t want the viewers to think that there’s only one way to accomplish something

  • @徐蕾-h5y
    @徐蕾-h5y 3 года назад +2

    Great explanation, even though i don't have any fundamentals in php nor laravel, very easy to catch up! Thank you so much!!!

    • @codewithdary
      @codewithdary  3 года назад

      Wow that is incredible to hear :)

  • @Jack.m7
    @Jack.m7 3 года назад +2

    All right guys! Love your intro. Learning a lot from your videos. 🙏

  • @ronrontall6370
    @ronrontall6370 3 года назад

    The best videos for Laravel that I've seen. Really good to find your channel!

  • @snelledre
    @snelledre 3 года назад +1

    The best channel so far i have seen.
    Keep up the good work.

    • @codewithdary
      @codewithdary  3 года назад

      Whoa that’s awesome to hear Andre! Thank you.

  • @sirbangalot569
    @sirbangalot569 3 года назад +1

    Dude you are a life saver.

  • @nomissimo
    @nomissimo 3 года назад +1

    Nice tutorial. Only thing is: I'm pretty sure you don't have Emmet but Laravel Blade Snippets. I didn't watch the videos before so I was confused as Emmet didn't work.

    • @codewithdary
      @codewithdary  3 года назад

      I've got both because VS code has Emmet installed b default :)

  • @alial-nuaimi2695
    @alial-nuaimi2695 Год назад +1

    DUDE WHAT THE HELL ? ur SO genuis and I'm happy to watch ur video !. U make my DAY

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

    I enjoy these videos. I have one suggestion for you why don't you use the --resourse parameter to create all of A CRUD requirement. Laravel resource routing assigns the typical create, read, update, and delete ("CRUD") routes to a controller with a single line of code away from the headache of missing of or forgetting a statement

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

      It's a video series, I did focused on the resource controllers later on :)

  • @zahrarashtchi6008
    @zahrarashtchi6008 3 года назад +1

    Thank you for your great tutorial, very helpful.

  • @sergeisurin2963
    @sergeisurin2963 3 года назад +1

    Thank you for the tutorials, very helpful

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

    You can return multiple with properties:
    return view('products.index)
    ->with('title', $title)
    ->with('description', $description);

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

      Definitely! Would probably prefer returning an array over multiple with methods!

  • @OnlyJavascript
    @OnlyJavascript 3 года назад

    vanakkam guru ji 🙏.. my only mentor for Laravel.

  • @AmsterFun
    @AmsterFun 3 года назад

    Hi Dary, thanks for your course! Tip/qq: when hitting a laravel error-message page you might use that event to show how to interpret error-messages. That is a useful part of coding as well.

  • @tanweisiang494
    @tanweisiang494 3 года назад +1

    Hi Dary, How do we use namespace in the Laravel 8 routing? For example I want to make my api with versioning. Do I have a better way to write instead of "use App\Http\Controllers\V1\ProductController", "use App\Http\Controllers\V2\ProductController"...

    • @codewithdary
      @codewithdary  3 года назад

      No :( you got to pull it in the use statement.

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

    you are a blessing

    • @codewithdary
      @codewithdary  3 года назад +1

      No, you are a blessing for watching and commenting so I can start my day the right way! Thanks :)

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

    finally found someone whom i can understand

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

      Nice, happy to help :)

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

      @@codewithdary yees im actually making projects but not on my own, i always follow youtube videos so i figured out that i have to really understand the basic logics in order to build a system, and luckily i found your youtube channel! thank you so much, i love how you explain it, straightforward with easy vocabularies. that's why it can be understood, i like this better than at my school hahaha, thank you!

  • @lethaldaku1
    @lethaldaku1 3 года назад +1

    liked your video ~ from Pakistan

    • @codewithdary
      @codewithdary  3 года назад

      Thank you Sebastian! Love from the Netherlands.

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

    The old method before Laravel 8 routing is working with Laravel version 8.6 :D

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

      Don’t pay too much attention to the version numbers. They add a new version number is a new patch comes out, which can be very small. Laravel 7 to 9 on the other hand is a big difference.

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

    hi dary! your explanation in awesome. but I go this error ErrorException
    Undefined variable: data (View: D:\Laravel\leckho
    esources\views\addons\index.blade.php) $data is undefined
    Make the variable optional in the blade template. Replace {{ $data }} with {{ $data ?? '' }} how to rectify the issue please let u me know

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

      Are you passing $data correctly from the controller to the view It's not recognising $data in your index.blade.php file! :)

  • @samyfarahat8672
    @samyfarahat8672 3 года назад +1

    I really like your channel, keep going! But I advice you to use to terminal of vscode I'ts a lot less effort.

    • @codewithdary
      @codewithdary  3 года назад

      Thanks for the tip! I was kind of in-between. Didn't knew which one was easier to use. Maybe for MySQL, it's better to use the terminal. But anyways, lots of thanks for your comment.

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

    Thank you

  • @morgane1762
    @morgane1762 3 года назад +1

    Is there a playlist?

    • @codewithdary
      @codewithdary  3 года назад

      Yessir! ruclips.net/p/PLFHz2csJcgk_3VJwzVoeyMuC1rdBcfiLv

  • @Akram-se3nc
    @Akram-se3nc 2 года назад

    Actually we can also pass multiple variables using ->with to blade file like Ex: ->with('name',$name)->with('age',$age);

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

    awesome

  • @NikhilBokadeNik_1D
    @NikhilBokadeNik_1D 3 года назад

    12:30 404 NOT FOUND error is displaying. What should I do ?

  • @ahmedsunil3235
    @ahmedsunil3235 3 года назад

    total how many videos?

    • @OnlyJavascript
      @OnlyJavascript 3 года назад

      totally 9 videos so far.

    • @ahmedsunil3235
      @ahmedsunil3235 3 года назад

      @@OnlyJavascript i meant total, not current :)

    • @OnlyJavascript
      @OnlyJavascript 3 года назад

      @@ahmedsunil3235 it depends

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

      I have no idea, I'll try to cover everything, I'm checking after every section how many videos I want to add.

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

    What does (Request $request) do and why?
    public function store(Request $request) {
    2 $this->validate($request, [
    3 'name' => 'required|string',
    4 'body' => 'required|string',
    5 'publish_at' => 'required|date_format:Y-m-d H:i:s'
    6 ]);

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

      It holds the request that has been submitted from a form :)

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

    Hello
    I had problem but I solved it. When I want to route to the index.blade.php file and then Laravent didn't find this.
    "InvalidArgumentException
    View [index.blade] not found.
    domingo.bingo/products".
    I modified view('index.blade') to view('index') in file ProductsController.php
    stackoverflow.com/questions/17913929/laravel-view-not-found-exception
    For people who will or have had the same problem as me.
    I would be happy if someone could explain why this is happening

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

      The view method finds the file based on the name without the file extension. In your case, it will convert it to index.blade.blade.php.