LaravelPackages.net
Acme Inc.
Toggle sidebar
reed-jones/roller-blade

A collection on custom blade directives that I find useful

182
1
0.0.1
About reed-jones/roller-blade

reed-jones/roller-blade is a Laravel package for a collection on custom blade directives that i find useful. It currently has 1 GitHub stars and 182 downloads on Packagist (latest version 0.0.1). Install it with composer require reed-jones/roller-blade. Discover more Laravel packages by reed-jones or browse all Laravel packages to compare alternatives.

Last updated

Roller Blade

A small collection of custom blade directives to be used with Laravel.

Tested on Laravel 5.6+

Directives

| Directive | Output | Comment | ------------- | ------------- | ------------------- | @app | <div id="app"></div> | Lazy way to get started with Vuejs | @title('My App') | <title>My App</title> | Set the title of the page | @js('https://cdn.polyfill.io/v2/polyfill.min.js') | <script defer src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> | link to external js files | @js(asset('js/main.js')) | <script defer src="http://myapp.test/js/main.js"></script> | Link to internal js files (such as the ones in assets) | @dnsPrefetch('https://fonts.gstatic.com') | <link href="https://fonts.gstatic.com" rel="dns-prefetch"> | Prefetches dns for faster css loading | @css('https://fonts.googleapis.com/css?family=Raleway:100,600') | <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css" > | Links stylesheet (Could be internal, like js example)

Installation

  1. Add "@php artisan view:clear" to your "post-dump-autoload" script in your projects composer.json. It should be the last line, right after "@php artisan package:discover".
"post-autoload-dump": [
  "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
  "@php artisan package:discover",
  "@php artisan view:clear"
]
  1. composer require reed-jones/roller-blade

If you would prefer not to add the view:clear command to your composer.json file, you can simply run php artisan view:clear after installing (and updating, and uninstalling).

Star History Chart