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 Filament\Infolists\Commands; use Filament\Support\Commands\Concerns\CanM..
Decoded Output download
<?php
namespace Filament\Infolists\Commands;
use Filament\Support\Commands\Concerns\CanManipulateFiles;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts ext;
#[AsCommand(name: 'make:infolist-layout')]
class MakeLayoutComponentCommand extends Command
{
use CanManipulateFiles;
protected $description = 'Create a new infolist layout component class and view';
protected $signature = 'make:infolist-layout {name?} {--F|force}';
public function handle(): int
{
$component = (string) str($this->argument('name') ?? text(
label: 'What is the layout name?',
placeholder: 'Wizard',
required: true,
))
->trim('/')
->trim('\')
->trim(' ')
->replace('/', '\');
$componentClass = (string) str($component)->afterLast('\');
$componentNamespace = str($component)->contains('\') ?
(string) str($component)->beforeLast('\') :
'';
$view = str($component)
->prepend('infolists\components\')
->explode('\')
->map(fn ($segment) => Str::kebab($segment))
->implode('.');
$path = app_path(
(string) str($component)
->prepend('Infolists\Components\')
->replace('\', '/')
->append('.php'),
);
$viewPath = resource_path(
(string) str($view)
->replace('.', '/')
->prepend('views/')
->append('.blade.php'),
);
if (! $this->option('force') && $this->checkForCollision([
$path,
])) {
return static::INVALID;
}
$this->copyStubToApp('LayoutComponent', $path, [
'class' => $componentClass,
'namespace' => 'App\Infolists\Components' . ($componentNamespace !== '' ? "\{$componentNamespace}" : ''),
'view' => $view,
]);
if (! $this->fileExists($viewPath)) {
$this->copyStubToApp('LayoutComponentView', $viewPath);
}
$this->components->info("Filament infolist layout component [{$path}] created successfully.");
return static::SUCCESS;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Filament\Infolists\Commands;
use Filament\Support\Commands\Concerns\CanManipulateFiles;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts\text;
#[AsCommand(name: 'make:infolist-layout')]
class MakeLayoutComponentCommand extends Command
{
use CanManipulateFiles;
protected $description = 'Create a new infolist layout component class and view';
protected $signature = 'make:infolist-layout {name?} {--F|force}';
public function handle(): int
{
$component = (string) str($this->argument('name') ?? text(
label: 'What is the layout name?',
placeholder: 'Wizard',
required: true,
))
->trim('/')
->trim('\\')
->trim(' ')
->replace('/', '\\');
$componentClass = (string) str($component)->afterLast('\\');
$componentNamespace = str($component)->contains('\\') ?
(string) str($component)->beforeLast('\\') :
'';
$view = str($component)
->prepend('infolists\\components\\')
->explode('\\')
->map(fn ($segment) => Str::kebab($segment))
->implode('.');
$path = app_path(
(string) str($component)
->prepend('Infolists\\Components\\')
->replace('\\', '/')
->append('.php'),
);
$viewPath = resource_path(
(string) str($view)
->replace('.', '/')
->prepend('views/')
->append('.blade.php'),
);
if (! $this->option('force') && $this->checkForCollision([
$path,
])) {
return static::INVALID;
}
$this->copyStubToApp('LayoutComponent', $path, [
'class' => $componentClass,
'namespace' => 'App\\Infolists\\Components' . ($componentNamespace !== '' ? "\\{$componentNamespace}" : ''),
'view' => $view,
]);
if (! $this->fileExists($viewPath)) {
$this->copyStubToApp('LayoutComponentView', $viewPath);
}
$this->components->info("Filament infolist layout component [{$path}] created successfully.");
return static::SUCCESS;
}
}
Function Calls
None |
Stats
MD5 | b7512f7238a2b6dc3f2ee0f6760771cb |
Eval Count | 0 |
Decode Time | 74 ms |