Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Tests; use Illuminate\Support\Facades\File; use Illuminate\Support\Facad..
Decoded Output download
<?php
namespace Tests;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Artisan;
class TestCase extends \Orchestra\Testbench\Dusk\TestCase
{
public function setUp(): void
{
$this->afterApplicationCreated(function () {
$this->makeACleanSlate();
});
$this->beforeApplicationDestroyed(function () {
$this->makeACleanSlate();
});
parent::setUp();
}
public function makeACleanSlate()
{
Artisan::call('view:clear');
File::deleteDirectory($this->livewireViewsPath());
File::deleteDirectory($this->livewireClassesPath());
File::deleteDirectory($this->livewireTestsPath());
File::delete(app()->bootstrapPath('cache/livewire-components.php'));
}
protected function getPackageProviders($app)
{
return [
\Livewire\LivewireServiceProvider::class,
];
}
protected function defineEnvironment($app)
{
$app['config']->set('view.paths', [
__DIR__.'/views',
resource_path('views'),
]);
$app['config']->set('app.key', 'base64:Hupx3yAySikrM2/edkZQNQHslgDWYfiBfCuSThJ5SK8=');
$app['config']->set('database.default', 'testbench');
$app['config']->set('database.connections.testbench', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
$app['config']->set('filesystems.disks.unit-downloads', [
'driver' => 'local',
'root' => __DIR__.'/fixtures',
]);
}
protected function livewireClassesPath($path = '')
{
return app_path('Livewire'.($path ? '/'.$path : ''));
}
protected function livewireViewsPath($path = '')
{
return resource_path('views').'/livewire'.($path ? '/'.$path : '');
}
protected function livewireTestsPath($path = '')
{
return base_path('tests/Feature/Livewire'.($path ? '/'.$path : ''));
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Tests;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Artisan;
class TestCase extends \Orchestra\Testbench\Dusk\TestCase
{
public function setUp(): void
{
$this->afterApplicationCreated(function () {
$this->makeACleanSlate();
});
$this->beforeApplicationDestroyed(function () {
$this->makeACleanSlate();
});
parent::setUp();
}
public function makeACleanSlate()
{
Artisan::call('view:clear');
File::deleteDirectory($this->livewireViewsPath());
File::deleteDirectory($this->livewireClassesPath());
File::deleteDirectory($this->livewireTestsPath());
File::delete(app()->bootstrapPath('cache/livewire-components.php'));
}
protected function getPackageProviders($app)
{
return [
\Livewire\LivewireServiceProvider::class,
];
}
protected function defineEnvironment($app)
{
$app['config']->set('view.paths', [
__DIR__.'/views',
resource_path('views'),
]);
$app['config']->set('app.key', 'base64:Hupx3yAySikrM2/edkZQNQHslgDWYfiBfCuSThJ5SK8=');
$app['config']->set('database.default', 'testbench');
$app['config']->set('database.connections.testbench', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
$app['config']->set('filesystems.disks.unit-downloads', [
'driver' => 'local',
'root' => __DIR__.'/fixtures',
]);
}
protected function livewireClassesPath($path = '')
{
return app_path('Livewire'.($path ? '/'.$path : ''));
}
protected function livewireViewsPath($path = '')
{
return resource_path('views').'/livewire'.($path ? '/'.$path : '');
}
protected function livewireTestsPath($path = '')
{
return base_path('tests/Feature/Livewire'.($path ? '/'.$path : ''));
}
}
Function Calls
None |
Stats
MD5 | 6ba294d20f74cb8282f5956337b4910b |
Eval Count | 0 |
Decode Time | 86 ms |