Download the PHP package canalaiz/sam without Composer

On this page you can find all versions of the php package canalaiz/sam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sam

Simple Assets Manager (Laravel 5.* Package)

Total Downloads StyleCI Build Status Latest Stable Version Latest Unstable Version

Sam (short for Simple Assets Manager) is a library built for Laravel 5.*. It provides an easy way to add assets (usually stylesheet or javascript files) to the page after it has been rendered. Sam, by default, uses simple substr and stripos to inject content within the html page. You can override this behaviour binding a different instance to .

Contents

Installation

1) In order to install Sam, just add the following to your composer.json. Then run composer update:

2) Open your config/app.php and add the following to the providers array:

3) In the same config/app.php and add the following to the aliases array:

4) Remember to declare Sam Middleware in app/Http/Kernel.php in the generic $middleware array or within the $middlewareGroups array:

Usage

You can use Sam in every context you like, since the injection happens after views are rendered and before the html is sent to the browser. The only requirement is to put the use statement:

Css

Css can be appended within document in two different ways: normal and inline. An optional minify parameter can be passed as second argument to request css minifying. This parameter defaults to false on Sam::pushCss and true to Sam::pushInlineCss. Minified assets are downloaded first and then served locally.

Css-Normal

The following command appends a stylesheet tag declaration before the closing of the HEAD tag:

If you need to minify the asset, use this command:

Css-Inline

The following command appends a stylesheet tag declaration before the closing of the HEAD tag, but content of original source url will be directly injected in the html within a tag:

Javascript

Javascript can be appended within document in two different ways: normal and inline. An optional minify parameter can be passed as second argument to request css minifying. This parameter defaults to false on Sam::pushJs and true to Sam::pushInlineJs. Minified assets are downloaded first and then served locally.

Javascript-Normal

The following command appends a script tag declaration before the closing of the BODY tag:

If you need to minify the asset, use this command:

Javascript-Inline

The following command appends a script tag declaration before the closing of the BODY tag, but content of original source url will be directly injected in the html within a tag:

Placeholder

A placeholder is an html comment in the format: . The following command prepends an html block before a specific placeholder:

Tag

The following command appends an html block before the closing of a specific tag.

License

Simple Asset Manager is free software distributed under the terms of the BSD-3-Clause license. Please refer to license.

Contribution guidelines

Support follows PSR-1 and PSR-4 PHP coding standards, and semantic versioning.

Please report any issue you find in the issues page.
Pull requests are welcome.


All versions of sam with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version 5.*
guzzlehttp/guzzle Version 6.*
matthiasmullie/minify Version 1.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package canalaiz/sam contains the following files

Loading the files please wait ....