If you didn't have the `laravelcollective/html` package yet, be sure to add that service provider too:
``` php
'providers' => [
// ...
Collective\Html\HtmlServiceProvider::class,
// ...
],
The CSS and Javascript files will be published to `public/css` and `public/js`.
Make sure to include these in the view where you want to use the macros. You have two choices for including the styles and scripts.
### Include all
Either you include all the plugins as a minified file.
``` html
<html>
<head>
...
<link href="/css/laravel-macros.css" rel="stylesheet">
</head>
<body>
...
<!-- Include Javascript at the end of body to improve page load speed -->
<script src="/js/laravel-macros.js" type="text/javascript"></script>
</body>
</html>
Include specific plugins
Or you include specific plugins., (*10)
``` html
, (*11)
...
...
<!-- IMPORTANT this file is required for the plugins to function -->
<script src="/js/laravel-macros-app.js" type="text/javascript"></script>
</body>
, (*12)
# That's it
You can now use the macros and all should work. Customization of the CSS and Javascript files should be straight forward.
Below, a few examples are given how to use these macros:
## Examples
Date picker
``` blade
{!! Form::datepicker('field_name', $default, ['class' => 'some-class']) !!}