Download the PHP package imanghafoori/laravel-smart-facades without Composer

On this page you can find all versions of the php package imanghafoori/laravel-smart-facades. 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-smart-facades

🍄 Laravel Smart Facades 🍄

The "Strategy pattern" in Laravel, made easy

by adding some features on top of Laravel facades.

Built with :heart: for every smart Laravel developer
                                           Quality Score [![Code Quality](https://scrutinizer-ci.com/g/imanghafoori1/laravel-smart-facades/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/imanghafoori1/laravel-smart-facades/?branch=master) [![Software License](https://img.shields.io/badge/license-MIT-blue.svg?style=round-square)](LICENSE.md) [![Check Imports](https://github.com/imanghafoori1/laravel-smart-facades/actions/workflows/check_imports.yml/badge.svg?branch=master)](https://github.com/imanghafoori1/laravel-smart-facades/actions/workflows/check_imports.yml) [![StyleCI](https://github.styleci.io/repos/166631643/shield?branch=master)](https://github.styleci.io/repos/166631643)

:flashlight: Installation:

⚡️ No need to have getFacadeAccessor()

Before:

After:

⚡️ Setting the default driver by shouldProxyTo($class):

Instead of binding a string to a concrete class with an IOC container, you can choose the low-level implementation class like this:

You can proxy to any abstract string (or closure) bound on the IoC container.

Note: If you invoke it twice, it will override:

⚡️ Using Non-default Driver:

If you want to change the driver at call site:

⚡️ Method Hooks:

You can introduce some code "Before" and "after" a method call, remotely: (like event listeners on eloquent models)

image

Here we have told the system evenever the MyFacade::findUser($id) method was called in the system, to perform a log.

⚡️ Choosing the driver, based on parameters value:

For example, let's say you want your facade to use an SMS-based driver by default, but if the text is very long (more than 200 chars) it should use an email driver.

You can do it like this:

image

:wrench: Automatic method injection when calling a method through a facade.

This the adds ability to enjoy automatic method injection when calling methods on POPOs (Plain Old Php Objects) WITHOUT any performance hit when you do not need it.

🐙 Example:

Calling Bar through a Facade:

Before:

After:


:raising_hand: Contributing:

If you find an issue or have a better way to do something, feel free to open an issue or a pull request.

:star: Your Stars Make Us Do More :star:

As always if you found this package useful and you want to encourage us to maintain and work on it. Just press the star button to declare your willingness.

More from the author:

Laravel Microscope

:gem: Automatically find bugs before they bite.


Laravel Widgetize

:gem: A minimal yet powerful package to give a better structure and caching opportunity for your Laravel apps.


It's not I am smarter or something, I just stay with the problems longer. "Albert Einstein"


All versions of laravel-smart-facades with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
illuminate/support Version ~5.1|^6.0|^7.0|^8.0|^9.0|10.*
illuminate/events Version ~5.1|^6.0|^7.0|^8.0|^9.0|10.*
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 imanghafoori/laravel-smart-facades contains the following files

Loading the files please wait ....