I'm developing an app using Laravel 4 and I have a question I'd like to be asked before fully commit to it.
I've created some custom classes and facades that has been added with success to laravel's configuration file.
For example:
namespace Helpers;
class Ftp {
public function connect($data)
{
// Do something
}
}
I'm actually using the php's use
statement to access to the facades as I do commonly in Laravel:
namespace Helpers;
use Illuminate\Support\Facades\File;
class Ftp {
public function Connect($data)
{
$file = File::get('text.txt');
...
}
}
Now what's the correct way to use laravel's facades inside a custom class? I don't feel that this is a good choice, expecially thinking about the testability. Any suggestion is appreciated!