09 - From Repeating HTML to Blade Component
We found 24 results for "blade".
One of the quickest ways to launch a website is to use a prebuilt HTML/CSS theme, free or paid. In this tutorial, I will show step-by-step how to take such Bootstrap-based theme for a real estate project, and turn it into a Laravel project: with layout, components and Eloquent data.
With Blade components and Tailwind, we can create great components in Laravel quickly. And there are also pre-built UI component libraries! This post will show four of them.
One of the most common performance issues I've seen in Laravel is using Eloquent methods and relationships from Blade, creating unnecessary extra loops and queries. In this article, I will show different scenarios and how to handle them effectively.
This video is meant for those who want to start with Vue.js and want to "feel" what it's like, this demo shows the main things: what is the component, how to add it, and how to compile the result.
This week I shared my thoughts on Twitter about Blade Components and that they are not that readable, in my opinion. After exchanging opinions with other Twitter users, I decided to practically test what's the difference of with/without components. So, two demos for you!
I decided to compile quick things I've learned over my Laravel career about Blade views and templates, here's my list.
Laravel has a 'production' blade directive that you can use to show data only when you are in a production environment, according to your `.env` file `APP_ENV` value. There is also another 'env' directive for any environment you specify.
A package to easily make use of SVG icons in your Laravel Blade views
Blade components to build forms with Tailwind CSS/Bootstrap
A Blade directive to export variables to JavaScript
In this video, I want to show you an example of "nested" Blade components for a table with headings/rows/cells, and also a new Laravel 8.62 feature to group such components in a sub-folder.
Today I'll show you how to add conditions inside of rows in @foreach and how to shorten it into a one-liner.
Five practical examples on how to detect if the link should be active.
Laravel is a back-end framework, but most web-projects still require a front-end theme. And there are no sites with "Laravel themes", all front-end themes are mostly based on WordPress CMS. But it shouldn't be a problem - we can easily transform a WP theme to Laravel Blade. We often do that for our clients, so I will show you a simple example.
Blade templates are mostly for viewing data. But sometimes we do need to add some checks and IF-structures. One of the tricky examples - loop through @foreach but do some action only on first/last element of the array. Blade doesn't have that functions in itself, so what do we do?
If you work with AngularJS and Laravel project, you might come across a conflict of the same syntax - both Angular and Blade use {{ }} brackets for variables. How to avoid errors? Actually, there's more than one option here.
In Blade language there's a simple @include() command, where you just pass the view path as a parameter. But what if you're not 100% sure if that view exists? Or what if you want to make it a dynamic variable? Let's explore the possibilities.
I've recently found out about a feature in Laravel relationship which changed the way I write code. So sharing with you.
Imagine a situation that you have 10 records to show in Blade but you need to show them in 2 sections, five records each. There's a pretty nice trick how to do that in @foreach loop.
Laravel Admin panel and more. Simple for beginners and powerful for experts. Using Blade, Alpine.js and Tailwind CSS.