When To Use Facades: Facades Vs. Helper Functions
Facades Vs. Helper Functions
Use Illuminate\Support\Facades\Cache;
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
Cache::shouldReceive('get')
->with('key')
->andReturn('value');
$this->visit('/cache')
->see('value');
} There is absolutely no practical difference between facades and helper functions.
Many facade call and helper call are equivalent
Return View::make('profile');
return view('profile'); Related concepts
→
Facades Vs. Helper Functions
→
Semantic portal