signifly /
laravel-builder-macros
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Signifly\BuilderMacros; |
||
| 4 | |||
| 5 | use Illuminate\Support\Collection; |
||
| 6 | use Illuminate\Support\ServiceProvider; |
||
| 7 | |||
| 8 | class BuilderMacroServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | public function register() |
||
| 11 | { |
||
| 12 | Collection::make(glob(__DIR__.'/macros/*.php')) |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 13 | ->mapWithKeys(function ($path) { |
||
| 14 | return [$path => pathinfo($path, PATHINFO_FILENAME)]; |
||
| 15 | }) |
||
| 16 | ->each(function ($macro, $path) { |
||
| 17 | require_once $path; |
||
| 18 | }); |
||
| 19 | } |
||
| 20 | } |
||
| 21 |