-
Notifications
You must be signed in to change notification settings - Fork 296
Install
-
To
composer.jsonadd:
"zofe/rapyd": "2.1.*"for Laravel 5.1
"zofe/rapyd": "2.0.*"for Laravel 5.0
"zofe/rapyd": "1.3.*"for Laravel 4.* -
run
$ composer update zofe/rapyd -
add this in the "provider" array on your config/app.php:
Zofe\Rapyd\RapydServiceProvider::class,
or for < 5.1
'Zofe\Rapyd\RapydServiceProvider', -
then publish assets:
$ php artisan vendor:publish
or for < 5.0
$ php artisan asset:publish zofe/rapyd
$ php artisan config:publish zofe/rapyd
You need also to add this to your views, to let rapyd add runtime assets:
<head>
...
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
{!! Rapyd::head() !!} or
{{ Rapyd::head() }} for L4
</head>note: widget output is in standard with Boostrap 3+, and some widget need support of JQuery 1.9+ so be sure to include dependencies as above
A better choice is to split css and javascipts and move javascript at bottom, just before body to speedup the page, you can do this with:
<head>
...
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
{!! Rapyd::styles() !!}
</head>
....
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
{!! Rapyd::scripts() !!}
</body>presentation
editing