In this video, we will look at the new Laravel blade directive which is @class. It was introduced in Laravel v8.51.0. With this Laravel blade directive, we can easily clean the conditional used in the HTML. It is very easy on the eyes and easy to know what’s going on in the future.
00:04 Introduction to Laravel’s @class directive
01:23 How to use it?
03:01 Benefits
03:13 How It Works Under The Hood?
06:37 Problem That May Arise By Using It?
07:39 How to Fix The Problem?
Social Media Links:
Let’s be friends
https://www.instagram.com/aashish_dhamala/
Follow On Facebook
https://www.facebook.com/laratipsofficial
Github Repository:
Please look at ‘new-in-laravel-class-blade-directive’ branch
https://github.com/Laratipsofficial/tips-and-tricks/tree/new-in-laravel-class-blade-directive
New In Laravel – Link for all the videos in this series
Tech stack:
Laravel
PHP
#laravel #php #laraveltip #laratips