Это видео недоступно.
Сожалеем об этом.

Creating Laravel Blade Component: Step-By-Step

Поделиться
HTML-код
  • Опубликовано: 23 июн 2023
  • Let's take an example Blade component x-text-input from Laravel Breeze and create a new similar one x-input-select.
    Official docs: laravel.com/docs/10.x/blade#c...
    Full course lesson "User Timezone in Registration": laraveldaily.com/lesson/larav...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.com/courses
    - Laravel QuickAdminPanel: quickadminpanel.com
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-archive.com/hom...
    - My personal Twitter: / povilaskorop

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

  •  Год назад +10

    I began following you based on a friend's recommendation. Although my English skills are not proficient, your explanations are so clear, detailed, and step-by-step that I don't even need to rely on automatic translation. I can understand everything very clearly. Thank you!

  • @1234matthewjohnson
    @1234matthewjohnson Год назад +6

    it is good to refresh on basic aspects of laravel too, blade components is a good one

  • @DanielFrostable
    @DanielFrostable 8 месяцев назад +1

    Thank you. I was following a linked in course and the aspect of setting up the carrying of attributes was not delved into. Seeing your solution helped me to understand 🙏

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

    Simple and heplful :)
    Greetings from Arrgentina!

  • @NickEnchev
    @NickEnchev 5 месяцев назад

    Amazing tutorial, thank you!

  • @DanielPoliFabro
    @DanielPoliFabro 9 месяцев назад +1

    this man is simply incredible!!!! tks Povilas Korop

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

    It was very useful!!!! thanks!

  • @mahmudsulemansheikhwunnam3580
    @mahmudsulemansheikhwunnam3580 Год назад +2

    Thank you for the efforts you put in making these videos. I'd would be great to show how to use the @old and @select to retain the selected value when the validation fails.

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

      Something to consider, adding to my to-do list.

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

    thank you 💚

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

    Thank you

  • @G.M.Can.
    @G.M.Can. 3 месяца назад

    When u doing something looks so cool and things working as i want. But i don't understand and i need to check another tutorial. I don't know, maybe i'm stupid.
    Thanks for the video.

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

    Thanks

  • @withtresor
    @withtresor 11 месяцев назад

    in the case whe we replace $timezones per models how can we displays all data ????????

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

    Is it possible for dynamic event if selected option is chosen? i.e opt1 is selected show dynamic inputs

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

      That would require JavaScript or Livewire

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

    what is the name of the extension that type ["view:", "var_name:"] in -> "return view( view: 'auth.register', compact( var_name: 'timezones'));?

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

    Please make a video on how to start an Event/Method after a resource has been completely saved including it's relationships.

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

      Not sure what is the problem there. In Controller, after calling save() or create() on model, dispatch the Event. Search for events/listeners on my channel.

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

    Wouldn't the more correct way be to create a component via artisan make:component instead of a simple blade?

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

    can you do course on youtube for dev ops too?

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

      No, I'm not planning to dive into dev ops any time soon, want to stick to Laravel.

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

      @raman Dev Ops is HUUUGE! It's a job on it's own. I am just dipping my toes into it and it's endless.

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

    Please update your browser...🙏🙏🙏

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

    Sir, I have a question.
    In Laravel validation can we stripe tags?
    Case: I have build a application where I provide api. so I don’t have blade template. We can escape html and script tags in blade like {{}} this.
    As, I have to give response in api, So i don't want to save html and script tag in database.
    Is laravel has any solution for this.
    Or In this case what will be your steps?

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

      Not sure I understand what exactly you want to strip, could you provide real example with data for request and response?

    • @bmtamim7818
      @bmtamim7818 Год назад +2

      @@LaravelDaily Here is the example:
      User input:
      {
      "comment": "alert('hacked')",
      }
      Validation in laravel:
      $request->validate([
      'comment'=> ['required','string']
      ]);
      Saved In the database:
      Comment::create([
      'user_id'=>Auth::id(),
      'comment' => $request->input('comment')
      ']);
      Now, the comment will save in the database with the (alert('hacked')) tags, I want to stripe_tags or htmlspecialchars()
      Is there laravel has system to do it in validation for example:
      $request->validate([
      'comment'=> ['required','string','safe']
      ]);
      If not, What will be your approach in this case.
      Note: As I mentioned we can prevent it into blade template or we can stripe the tags in api resource response. For this I have to do this manually. So, my case I don't want to save (alert('hacked')) tags in database like this executable. Because, it saved like this maybe hacker can perform XSS attack
      Thanks sir

    • @L4Festa
      @L4Festa Год назад +2

      ​@@bmtamim7818 If you don't want to do it "manually", then I think HTMLPurifier does exactly what you need.

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

      It depends on which level you want to strip.
      I would probably do it here in your code:
      Comment::create([
      'user_id'=>Auth::id(),
      'comment' => strip_tags($request->input('comment'))
      ']);

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

      @@LaravelDaily Thanks a lot sir,
      BTW, Laravel daily is a part of my daily life. I was switching much, You are the only reason I am still with laravel and working on some good projects.❤️

  • @Vinicius-xn5gm
    @Vinicius-xn5gm Год назад

    It's not better to use Vue components instead?

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

      If you have dynamic behavior for JavaScript then maybe yes