Download the PHP package erickcomp/laravel-stacked-components without Composer

On this page you can find all versions of the php package erickcomp/laravel-stacked-components. 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 laravel-stacked-components

Latest Stable Version Total Downloads License

Use Blade Components syntax to insert (push/prepend) content to stacks

This package provides some blade components that you can use to insert content into stacks, most notably, scripts and styles.

The vanilla-Blade way

To push some JS file/code to a stack, you have to (from Laravel docs):

or, for inline JS:

It, of course, works. But when using Blade Components, the intention is stay closer to HTML whenever possible

The Stacked Components Ways

JS component:

or, for inline JS:

This package automatically calls Laravel's function by default. You can override this behavior to call you own callable or to call nothing at all. To do either of these, you can set the environment variable

or the config value

To call any callable, you can use one of the following options the PHP's callable syntax or the Laravel's "@" syntax (). To call no function by default you must set the config value or the environment variable with the value false.

Note that if decide to use objects (anonoymous functions, invokable objects, first-class callables), you won't be able to use Laravel's config cache, since it does not support cache for these types of config values.

Content component:

or, for inline JS:

Other components

This package provides 4 components

For the CSS and JS components, you can set a default stack in config/env and omit it when using the component, like this:

.env file:

and in your view file:

Resolving name collisions with other components

This package provides the js and the css components. If your app already defined this, or even a library you're using did this, you have 2 options:

1 - Register a namespace for the components of this package. To do so, you can set the environment variable

or the config value

If you set the namespace with the bool value "true", it will use the namespace "stacked". If you set it to any string, the set string will be used as the blade components namespace. For more information on components namespaces check the Laravel docs

2 - Set the config values

or the environment variables

To specify alternate names for the js and css components

Remember to clear the views caches when changing any of these values. To clear the view cache run the view:cache artisan command:

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-stacked-components with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
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 erickcomp/laravel-stacked-components contains the following files

Loading the files please wait ...