I am developing an application using Laravel 4, and I have a question that I would like to ask before I complete it.
I created some custom classes and facades that were successfully added to the laravel configuration file.
For instance:
namespace Helpers; class Ftp { public function connect($data) {
I use the php use statement to access facades, as usual in Laravel:
namespace Helpers; use Illuminate\Support\Facades\File; class Ftp { public function Connect($data) { $file = File::get('text.txt'); ... } }
Now, what is the right way to use lavarel facades inside a custom class? I donβt feel that this is a good choice, especially thinking about testability. Any suggestion appreciated!
Ingro source share