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 Sep 21, 2015 · 4 revisions

Install in Laravel 5.1, 5.0, 4.*

  1. To composer.json add:
    "zofe/rapyd": "2.1.*" for Laravel 5.1
    "zofe/rapyd": "2.0.*" for Laravel 5.0
    "zofe/rapyd": "1.3.*" for Laravel 4.*

  2. run $ composer update zofe/rapyd

  3. add this in the "provider" array on your config/app.php:
    Zofe\Rapyd\RapydServiceProvider::class,
    or for < 5.1
    'Zofe\Rapyd\RapydServiceProvider',

  4. 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>
Clone this wiki locally