Download the PHP package highvertical/widget-package without Composer

On this page you can find all versions of the php package highvertical/widget-package. 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 widget-package

Widget Package for Laravel

Introduction

The Widget Package is a simple yet powerful Laravel package that allows developers to create reusable widgets for their applications. These widgets can be used anywhere in Blade views, making it easier to manage complex UIs, build dynamic content, and maintain a clean separation of concerns. The package is designed to be compatible with both small and large projects, including modular applications like those built with nwidart/laravel-modules.

Features

Simple Widget Creation:

Create widgets that can be easily rendered in Blade views.

Caching:

Built-in support for caching widget output to improve performance.

Dynamic Configuration:

Define and manage widgets via a configuration file.

Modular Compatibility:

Fully compatible with modular applications, including those using nwidart/laravel-modules.

Advanced Blade Directives:

Use custom Blade directives to render widgets anywhere in your views.

Installation

This command will create a config/widgets.php file in your application.

Basic Usage

Advanced Usage

Caching

The Widget Package supports caching out of the box. To enable caching, simply ensure that the cache.enabled configuration is set to true in your config/widgets.php file:

When caching is enabled, the widget output is stored and reused for subsequent requests within the specified time-to-live (TTL) period.

Dynamic Widget Configuration

Widgets can be defined dynamically across different parts of your application, including within modular applications. This allows for more flexible and maintainable code, particularly in larger projects.

Example: Modular Widgets with nwidart/laravel-modules

If you are using nwidart/laravel-modules, you can define widgets within individual modules. For example, in a module named Blog, create a Config/widgets.php file:

The package will automatically detect and register these widgets, making them available across your entire application.

Handling Widget Dependencies

Widgets can have dependencies that need to be resolved by Laravel's service container. You can easily inject these dependencies by defining a constructor in your widget class:

Extending and Overriding Configuration

To extend or override the default widget configuration, modify your config/widgets.php file. This is particularly useful if you are integrating the package into an existing project and need to adapt it to your specific needs.

Blade Directives

The package registers a custom Blade directive @widget to make it easy to render widgets in your views. This directive takes the widget alias and an optional array of parameters.

Example Widgets

Customization and Extensibility

The Widget Package is designed to be easily customizable and extensible. You can create your own widgets, customize existing ones, or even extend the package's core functionality to meet your specific needs.

Contributing

We welcome contributions to the Widget Package. If you have ideas for improvements, find a bug, or want to help with the documentation, feel free to submit a pull request or open an issue on GitHub.

License

The Widget Package is open-sourced software licensed under the MIT license.


All versions of widget-package with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.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 highvertical/widget-package contains the following files

Loading the files please wait ....