Package Data | |
---|---|
Maintainer Username: | RTMatt |
Maintainer Contact: | matt@redtrainwebservices.com (:RT Matt) |
Package Create Date: | 2016-02-03 |
Package Last Update: | 2016-02-03 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-04-28 15:02:37 |
Package Statistics | |
---|---|
Total Downloads: | 26 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Laravel Service provider built around Agent to add browser classes to the body HTML tag.
Install using composer:
$ composer require rtmatt/body-class
Add service provider to config/app.php
Rtmatt\BodyClass\BodyClassServiceProvider::class
This requires your layout file to be /resources/views/layouts/main.blade.php
. Support for multiple or other layouts may come in the future.
In file mentioned above, add the following to your body tag:
<body{!! ($body_class) ? ' class="'.$body_class.'"' : '' !!}>
You are good to go!