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 PowerComponents\LivewirePowerGrid\Actions; use Illuminate\Support\Facade..
Decoded Output download
<?php
namespace PowerComponents\LivewirePowerGrid\Actions;
use Illuminate\Support\Facades\Schema;
use function Laravel\Prompts\{error, info, suggest};
final class AskDatabaseTableName
{
public static function handle(): string
{
$tableExists = false;
while (!$tableExists) {
$tableName = suggest(
label: 'Enter or Select a DB Table',
options: ListDatabaseTables::handle(),
required: true,
);
if (CheckIfDatabaseHasTables::handle() === false) {
$tableExists = true; // Assuming user is creating component before migrating DB.
info(' Database seems to be empty. Aborting Database related steps!');
} else {
$tableExists = Schema::hasTable($tableName);
if (!$tableExists) {
error("The table [{$tableName}] does not exist! Try again or press Ctrl+C to abort.");
}
}
}
return $tableName;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace PowerComponents\LivewirePowerGrid\Actions;
use Illuminate\Support\Facades\Schema;
use function Laravel\Prompts\{error, info, suggest};
final class AskDatabaseTableName
{
public static function handle(): string
{
$tableExists = false;
while (!$tableExists) {
$tableName = suggest(
label: 'Enter or Select a DB Table',
options: ListDatabaseTables::handle(),
required: true,
);
if (CheckIfDatabaseHasTables::handle() === false) {
$tableExists = true; // Assuming user is creating component before migrating DB.
info(' Database seems to be empty. Aborting Database related steps!');
} else {
$tableExists = Schema::hasTable($tableName);
if (!$tableExists) {
error("The table [{$tableName}] does not exist! Try again or press Ctrl+C to abort.");
}
}
}
return $tableName;
}
}
Function Calls
None |
Stats
MD5 | 43faf31000858169faa90b5cb808191f |
Eval Count | 0 |
Decode Time | 73 ms |