Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Install

Felice Ostuni edited this page Jul 29, 2014 · 4 revisions

Install in Laravel 4.1 & 4.2

To composer.json add:
"zofe/rapyd": "1.3.*" for both, not frequently updated (should be stable)
"zofe/rapyd": "dev-master" for both, with latest stuffs (may be unstable)

In app/config/app.php add:
'Zofe\Rapyd\RapydServiceProvider',

then run: $ composer update zofe/rapyd.

Publish & override configuration (optional)

You can quickly publish the configuration file (to override something) by running the following Artisan command.

$ php artisan config:publish zofe/rapyd

Publish & integrate assets (needed)

You need to publish the assets from this package.

$ php artisan asset:publish zofe/rapyd

Note: The public assets can change overtime (because of upstream changes), it is recommended to re-publish them after update.
Alternatively you can add the publish command in composer.json.

"post-update-cmd": [
    "php artisan asset: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() }}
</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>
Clone this wiki locally