PHPackages                             simonmarcellinden/scriptloader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. simonmarcellinden/scriptloader

ActiveLibrary

simonmarcellinden/scriptloader
==============================

Package for load dynamically Scripts &amp; Styles

1.1.3(4y ago)015[1 issues](https://github.com/SimonMarcelLinden/ScriptLoader/issues)MITPHP

Since Jun 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/SimonMarcelLinden/ScriptLoader)[ Packagist](https://packagist.org/packages/simonmarcellinden/scriptloader)[ Docs](https://github.com/simonmarcellinden/scriptloader)[ RSS](/packages/simonmarcellinden-scriptloader/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

ScriptLoader for Laravel
========================

[](#scriptloader-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9ce3ff3632f9556796ba7ac0c117f69d84effc8439fa6eaece066c138755b0d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696d6f6e6d617263656c6c696e64656e2f7363726970746c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simonmarcellinden/scriptloader)[![Total Downloads](https://camo.githubusercontent.com/93bcc4c60f5f5308c53b684efd80dfc9060eab0ce5587111c920b4e11e1edb17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696d6f6e6d617263656c6c696e64656e2f7363726970746c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simonmarcellinden/scriptloader)[![Build Status](https://camo.githubusercontent.com/f687e59cf71a57c8e4e2d224681369c1b311c4585ed2d28a533c6f5384740caa/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73696d6f6e6d617263656c6c696e64656e2f7363726970746c6f616465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/simonmarcellinden/scriptloader)

With this package you can manage header Styles and Scripts Tags to load from Laravel controllers.

---

Installation
------------

[](#installation)

- [Laravel ScriptLoader on Packagist](https://packagist.org/packages/simonmarcellinden/scriptloader)
- [Laravel ScriptLoader GitHub](https://github.com/SimonMarcelLinden/ScriptLoader)

From the command line run

```
$ composer require simonmarcellinden/scriptloader

```

### Laravel &lt;= 5.4

[](#laravel--54)

Once ScriptLoader is installed you need to register the service provider with the application. Open up `config/app.php` and find the `providers` key.

Add the service provider to `config/app.php`

```
    SimonMarcelLinden\ScriptLoader\ScriptLoaderServiceProvider::class,
```

Optionally include the Facade in config/app.php if you'd like.

```
    "ScriptLoader" =>"SimonMarcelLinden\ScriptLoader\Facades\ScriptLoader::class,
```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
$ no config needed

```

A configuration file will be publish to `config/scriptloader.php`.

Usage
-----

[](#usage)

### Examples

[](#examples)

Add a Script or Style Source directly into your route or controller

#### app/Http/Controllers/Controller.php

[](#apphttpcontrollerscontrollerphp)

```
