Skip to content

Commit ca157ed

Browse files
Brent Roosefreekmurze
authored andcommitted
Add Spatie\Fractal\Facades\Fractal (#189)
1 parent c79bf15 commit ca157ed

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-fractal` will be documented in this file
44

5+
## 5.5.1 - 2019-03-??
6+
7+
- add `Spatie\Fractal\Facades\Fractal`
8+
59
## 5.5.0 - 2019-02-27
610

711
- drop support for PHP 7.1

src/Facades/Fractal.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Spatie\Fractal\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @see \Spatie\Fractal\Fractal
9+
*/
10+
class Fractal extends Facade
11+
{
12+
/**
13+
* Get the registered name of the component.
14+
*
15+
* @return string
16+
*/
17+
protected static function getFacadeAccessor()
18+
{
19+
return 'fractal';
20+
}
21+
}

tests/FractalFacadeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class FractalFacadeTest extends TestCase
1313
public function it_returns_an_instance_of_fractal()
1414
{
1515
$this->assertInstanceOf(Fractal::class, FractalFacade::collection([]));
16+
$this->assertInstanceOf(Fractal::class, \Spatie\Fractal\Facades\Fractal::collection([]));
1617
}
1718

1819
/** @test */

0 commit comments

Comments
 (0)