Press "Enter" to skip to content

Structuring html blocks in blade

As a developer, we often run into situation where we cannot find a closing div. In this case even IDE does not help because it will simply assume there is one last div is missing at the end of html structure.

The best way to prevent the mess up in html div are to use components in laravel.

For example, you have this piece of code

Now, imagine if you have missed the closing tag of second div.

Your IDE will tell you that there needs to a closing div tag after your last div. So, we will put it. But that is not supposed to happen. If luck runs out, it will create a chain of mess which will force your to rearrange your div structure from start, piece by piece.

So, to prevent these sort of mess, we can use blade components.

Save it as input.blade.php . Now use this component this way,

Any error configuration will  throw out an error straight away. You can play around on how make it more smoother.

 

Everything is awesome.

8 Comments

  1. First off I want to say wonderful blog! I had a quick question in which I’d like to ask if you do
    not mind. I was interested to find out how you center yourself and clear your mind before writing.
    I’ve had trouble clearing my mind in getting my thoughts out there.
    I truly do enjoy writing but it just seems like the first
    10 to 15 minutes are generally wasted simply just trying to figure out how
    to begin. Any suggestions or hints? Thanks!

  2. Oh my goodness! Awesome article dude! Thanks, However I am having problems with your RSS.
    I don’t know the reason why I can’t join it. Is there anybody else having the same
    RSS issues? Anyone who knows the solution can you kindly respond?
    Thanx!!

  3. Woah! I’m really enjoying the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance”
    between user friendliness and visual appeal.
    I must say you’ve done a excellent job with this. Also, the blog loads extremely quick for me on Internet explorer.
    Excellent Blog!

  4. Sling TV
    Sling TV November 15, 2018

    Please let me know if you’re looking for a article author for your weblog.

    You have some really good articles and I feel I would be a good asset.
    If you ever want to take some of the load off, I’d absolutely love to write some content for your blog in exchange
    for a link back to mine. Please shoot me an email if interested.
    Kudos!

  5. Sling tv coupons and promo codes for november 2018
    Fastidious respond in return of this query with genuine arguments and explaining the whole thing on the topic of
    that. Sling tv coupons and promo codes for november 2018

  6. Sling tv coupons and promo codes for november 2018
    First of all I would like to say great blog!
    I had a quick question in which I’d like to ask if you do not mind.

    I was interested to find out how you center yourself
    and clear your thoughts before writing. I’ve had difficulty clearing my mind in getting my ideas out.

    I do enjoy writing however it just seems like the first 10 to 15 minutes are generally wasted just trying to figure out how
    to begin. Any ideas or hints? Many thanks! Sling tv coupons and promo codes for november 2018

Leave a Reply

Your email address will not be published.