Download the PHP package breda/laravel-alpha-widget without Composer

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

AlphaWidget — Widgets For Laravel 5


This is a very simple, easy to use Widget manager for Laravel 5

Installation

First, install the package via Composer.

in the config/app.php file, add the Service Provider

Then, register the alias :

And, lastly... publish the AlphaWidget configuration file to your config directory:

And you're ready to use AlphaWidget!


Walk Through

Now, when I said that this is a simple Widget manager, I meant it! It's as simple as registering a widget alias, and it's class inside the configuration file. Like this :

One note to take here before we move on, is that I'am only referencing the class name, not the complete namespace. And that's what the namespace field in the config/alphaWidget.php file is here for.

To shorten class names, put your desired namespace in the config file, just make sure that all of your widget classes declare that namespace, that's all!

And then, calling the widget is as simple as :

Now, what does that RecentUsers look like, I hear you say! It's a simple class implementing the AlphaWidget Contract (interface), stating that it must have the render method. That method, is responsible of rendering the widget contents.

One note to take here! Is that the render method, should return the contents, and NOT echo them out! Remember! No echo! Just return.

Another note

Passing Arguments To Widget Calls

You can of course, pass arguments to widget calls. Like this for example:

And then in your class:

Now! One last thing to note! Since all widgets are resolved through the Laravel's IoC container, you can type-hint any Laravel Service to be used in your Widget class!

Practical Example

An good example, would be fetching the 5 recently registered users.

And that's it really!


Contributing

Anything from bug fixes, improvements or anything similar! Pull requests are welcome! Just make sure to submit them to the develop branch, rather to the master branch, as this later only has production-ready code.


All versions of laravel-alpha-widget with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 5.0.*
illuminate/contracts Version 5.0.*
illuminate/container Version 5.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 breda/laravel-alpha-widget contains the following files

Loading the files please wait ....