Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.117.132.79
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
1 /
vendor /
spatie /
laravel-fractal /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Console
[ DIR ]
drwxr-xr-x
2021-02-02 18:21
Facades
[ DIR ]
drwxr-xr-x
2021-02-02 18:21
Fractal.php
3.78
KB
-rw-r--r--
2021-02-02 18:21
FractalFacade.php
335
B
-rw-r--r--
2021-02-02 18:21
FractalServiceProvider.php
1.56
KB
-rw-r--r--
2021-02-02 18:21
helpers.php
557
B
-rw-r--r--
2021-02-02 18:21
Save
Rename
<?php namespace Spatie\Fractal; use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\Collection; use Illuminate\Support\ServiceProvider; use Laravel\Lumen\Application as LumenApplication; use Spatie\Fractal\Console\Commands\TransformerMakeCommand; class FractalServiceProvider extends ServiceProvider { /** * Bootstrap the application services. */ public function boot() { $this->setupConfig(); if ($this->app->runningInConsole()) { $this->commands([ TransformerMakeCommand::class, ]); } $this->setupMacro(); } /** * Register the application services. */ public function register() { $this->app->singleton('fractal', function ($app, $arguments) { return fractal(...$arguments); }); $this->app->alias('fractal', Fractal::class); } protected function setupConfig() { $source = realpath(__DIR__.'/../config/fractal.php'); if ($this->app instanceof LaravelApplication) { $this->publishes([$source => config_path('fractal.php')]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('fractal'); } $this->mergeConfigFrom($source, 'fractal'); } /** * Add a 'transformWith' macro to Laravel's collection. */ protected function setupMacro() { Collection::macro('transformWith', function ($transformer) { return fractal($this, $transformer); }); } }