Download the PHP package liran-co/laravel-frontend-services without Composer
On this page you can find all versions of the php package liran-co/laravel-frontend-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download liran-co/laravel-frontend-services
More information about liran-co/laravel-frontend-services
Files in liran-co/laravel-frontend-services
Package laravel-frontend-services
Short Description Easily add third-party services to your front-end.
License MIT
Homepage https://github.com/liran-co/laravel-frontend-services
Informations about the package laravel-frontend-services
Laravel Frontend Services
⚠️ Warning: This is a pre-release version that is not yet ready for production use.
Laravel Frontend Services exposes Blade Components that make it easier to integrate and include the scripts of third-party services.
Installation
To get started, install the liran-co/laravel-frontend-services
package:
Usage
First, add the relevant configuration values for each service you'd like to use in the config/services.php
file.
You'll find a full list of supported services below with their corresponding configuration keys.
Next, use Blade component syntax to include the service in your view:
Typically you'll want to either do this in the <head>
section of your site or before the closing </body>
tag.
Advanced Usage
Show
If you'd like to include a service based on some conditional, you can use the show
attribute on the component. For example, to only include the Intercom service when a user is logged in, you can do this:
Environments
Since it's common to only include certain scripts in production environments, you can define an environments
key in your config file that will automatically cause the service to be included if the current environment matches one in the array:
Supported Services
Service | Component | Configurations |
---|---|---|
<x-services::facebook /> |
app_id |
|
Fullstory | <x-services::fullstory /> |
org_id debug |
Google Analytics | <x-services::googleanalytics /> |
property_id |
Heap | <x-services::heap /> |
app_id |
Intercom | <x-services::intercom /> |
app_id |
Segment | <x-services::segment /> |
write_key |
Sentry | <x-services::sentry /> |
dsn environment debug |
License
Released under the MIT license. See LICENSE for more information.