prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
te\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:class')]
class ClassMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
... | return $this->option('invokable')
? $this->resolveStubPath('/stubs/class.invokable.stub')
: $this->resolveStubPath('/stubs/class.stub');
}
/**
* Resolve the fully-qualified path to the stub.
*
* @param | e type of class being generated.
*
* @var string
*/
protected $type = 'Class';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
| {
"filepath": "src/Illuminate/Foundation/Console/ClassMakeCommand.php",
"language": "php",
"file_size": 1638,
"cut_index": 537,
"middle_length": 229
} |
e\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'clear-compiled')]
class ClearCompiledCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'clear-compiled';
/**
* The console command description.
*
... | laravel->getCachedServicesPath())) {
@unlink($servicesPath);
}
if (is_file($packagesPath = $this->laravel->getCachedPackagesPath())) {
@unlink($packagesPath);
}
$this->components->info('Compiled ser | ()
{
if (is_file($servicesPath = $this-> | {
"filepath": "src/Illuminate/Foundation/Console/ClearCompiledCommand.php",
"language": "php",
"file_size": 948,
"cut_index": 582,
"middle_length": 52
} |
;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\VarDumper\Caster\ReflectionCaster;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper as BaseCliDumper;
use Symfony\Component\VarDumper\VarDumper;
cla... | ompiledViewPath;
/**
* If the dumper is currently dumping.
*
* @var bool
*/
protected $dumping = false;
/**
* Create a new CLI dumper instance.
*
* @param \Symfony\Component\Console\Output\OutputInterface | e output instance.
*
* @var \Symfony\Component\Console\Output\OutputInterface
*/
protected $output;
/**
* The compiled view path for the application.
*
* @var string
*/
protected $c | {
"filepath": "src/Illuminate/Foundation/Console/CliDumper.php",
"language": "php",
"file_size": 3340,
"cut_index": 614,
"middle_length": 229
} |
minate\Console\ManuallyFailedException;
use Illuminate\Support\Facades\Schedule;
use Illuminate\Support\Traits\ForwardsCalls;
use ReflectionFunction;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* @mixin \Illuminate\Console\Scheduling\Event
*/
class Cl... | _construct($signature, Closure $callback)
{
$this->callback = $callback;
$this->signature = $signature;
parent::__construct();
}
/**
* Execute the console command.
*
* @param \Symfony\Component\Console\ | cription.
*
* @var string
*/
protected $description = '';
/**
* Create a new command instance.
*
* @param string $signature
* @param \Closure $callback
*/
public function _ | {
"filepath": "src/Illuminate/Foundation/Console/ClosureCommand.php",
"language": "php",
"file_size": 3092,
"cut_index": 614,
"middle_length": 229
} |
use Illuminate\Console\GeneratorCommand;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:component')]
class ComponentMakeCommand extends Genera... | ent';
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
if ($this->option('view')) {
return $this->writeView();
}
if (parent::handle() === false && ! $thi | d description.
*
* @var string
*/
protected $description = 'Create a new view component class';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Compon | {
"filepath": "src/Illuminate/Foundation/Console/ComponentMakeCommand.php",
"language": "php",
"file_size": 4742,
"cut_index": 614,
"middle_length": 229
} |
e Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Arr;
use LogicException;
use Symfony\Component\Console\Attribute\AsCommand;
use Throwable;
#[AsCommand(name: 'config:cache')]
class ConfigCacheCommand extends Com... | * Create a new config cache command instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
*/
public function __construct(Filesystem $files)
{
parent::__construct();
$this->files = $files;
}
/* | ng
*/
protected $description = 'Create a cache file for faster configuration loading';
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
| {
"filepath": "src/Illuminate/Foundation/Console/ConfigCacheCommand.php",
"language": "php",
"file_size": 2545,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'config:clear')]
class ConfigClearCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
... | ystem $files
*/
public function __construct(Filesystem $files)
{
parent::__construct();
$this->files = $files;
}
/**
* Execute the console command.
*
* @return void
*/
public function handle() | /**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new config clear command instance.
*
* @param \Illuminate\Filesystem\Files | {
"filepath": "src/Illuminate/Foundation/Console/ConfigClearCommand.php",
"language": "php",
"file_size": 1166,
"cut_index": 518,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
use function Illuminate\Filesystem\join_paths;
#[AsCommand(name: 'make:config', aliases: ['config:make'])]
class ConfigMakeCo... | onfig';
/**
* The console command name aliases.
*
* @var array<int, string>
*/
protected $aliases = ['config:make'];
/**
* Get the destination file path.
*
* @param string $name
*/
protected funct | e command description.
*
* @var string
*/
protected $description = 'Create a new configuration file';
/**
* The type of file being generated.
*
* @var string
*/
protected $type = 'C | {
"filepath": "src/Illuminate/Foundation/Console/ConfigMakeCommand.php",
"language": "php",
"file_size": 2007,
"cut_index": 537,
"middle_length": 229
} |
t\Collection;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Finder\Finder;
use function Laravel\Prompts\select;
#[AsCommand(name: 'config:publish')]
class ConfigPublishCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
... | /**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$config = $this->getBaseConfigurationFiles();
if (is_null($this->argument('name')) && $this->option('all')) {
fore | {--force : Overwrite any existing configuration files}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Publish configuration files to your application';
| {
"filepath": "src/Illuminate/Foundation/Console/ConfigPublishCommand.php",
"language": "php",
"file_size": 3142,
"cut_index": 614,
"middle_length": 229
} |
e Illuminate\Console\Command;
use Illuminate\Support\Arr;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'config:show')]
class ConfigShowCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'config:show {config : The ... | $this->fail("Configuration file or key <comment>{$config}</comment> does not exist.");
}
$this->newLine();
$this->render($config);
$this->newLine();
return Command::SUCCESS;
}
/**
* Render the | iguration file or key';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$config = $this->argument('config');
if (! config()->has($config)) {
| {
"filepath": "src/Illuminate/Foundation/Console/ConfigShowCommand.php",
"language": "php",
"file_size": 2960,
"cut_index": 563,
"middle_length": 229
} |
e Illuminate\Console\Concerns\CreatesMatchingTest;
use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:command')]
class ... | protected $type = 'Console command';
/**
* Replace the class name for the given stub.
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceClass($stub, $name)
{
| /**
* The console command description.
*
* @var string
*/
protected $description = 'Create a new Artisan command';
/**
* The type of class being generated.
*
* @var string
*/
| {
"filepath": "src/Illuminate/Foundation/Console/ConsoleMakeCommand.php",
"language": "php",
"file_size": 2528,
"cut_index": 563,
"middle_length": 229
} |
tion\ProcessFailedException;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;
use Throwable;
use function Laravel\Prompts\suggest;
#[AsCommand(name: 'docs')]
class DocsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var strin... | search against the documentation, you may call: <fg=green>php artisan docs -- </><fg=green;options=bold;>search query here</>';
/**
* The HTTP client instance.
*
* @var \Illuminate\Http\Client\Factory
*/
protected $http;
| * @var string
*/
protected $description = 'Access the Laravel documentation';
/**
* The console command help text.
*
* @var string
*/
protected $help = 'If you would like to perform a content | {
"filepath": "src/Illuminate/Foundation/Console/DocsCommand.php",
"language": "php",
"file_size": 13722,
"cut_index": 921,
"middle_length": 229
} |
le\Command;
use Illuminate\Foundation\Events\MaintenanceModeEnabled;
use Illuminate\Foundation\Exceptions\RegisterErrorViewPaths;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use ... | r of seconds or the datetime after which the request may be retried}
{--refresh= : The number of seconds after which the browser may refresh}
{--secret= : The secret phrase that may be used | edirect= : The path that users should be redirected to}
{--render= : The view that should be prerendered for display during maintenance mode}
{--retry= : The numbe | {
"filepath": "src/Illuminate/Foundation/Console/DownCommand.php",
"language": "php",
"file_size": 5693,
"cut_index": 716,
"middle_length": 229
} |
Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use function Laravel\Prompts\select;
#[AsCommand(name: 'make:enum')]
class EnumMakeCommand extends GeneratorCommand
{
/*... | eturn string
*/
protected function getStub()
{
if ($this->option('string') || $this->option('int')) {
return $this->resolveStubPath('/stubs/enum.backed.stub');
}
return $this->resolveStubPath('/stubs/enum.s | rotected $description = 'Create a new enum';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Enum';
/**
* Get the stub file for the generator.
*
* @r | {
"filepath": "src/Illuminate/Foundation/Console/EnumMakeCommand.php",
"language": "php",
"file_size": 3618,
"cut_index": 614,
"middle_length": 229
} |
minate\Support\Env;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts\password;
#[AsCommand(name: 'env:decrypt')]
class EnvironmentDecryptCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
... | **
* The console command description.
*
* @var string
*/
protected $description = 'Decrypt an environment file';
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $fi | to be decrypted}
{--force : Overwrite the existing environment file}
{--path= : Path to write the decrypted file}
{--filename= : Filename of the decrypted file}';
/ | {
"filepath": "src/Illuminate/Foundation/Console/EnvironmentDecryptCommand.php",
"language": "php",
"file_size": 5172,
"cut_index": 716,
"middle_length": 229
} |
e\Console\Command;
use Illuminate\Encryption\Encrypter;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts\password;
use function Laravel\Prompts\select;
#[AsCommand(name: 'env:encrypt')]
class EnvironmentEncryptCommand ext... | le names}
{--prune : Delete the original environment file}
{--force : Overwrite the existing encrypted environment file}';
/**
* The console command description.
*
* @var string
*/
protec | ion key}
{--cipher= : The encryption cipher}
{--env= : The environment to be encrypted}
{--readable : Encrypt each variable individually with readable, plain-text variab | {
"filepath": "src/Illuminate/Foundation/Console/EnvironmentEncryptCommand.php",
"language": "php",
"file_size": 4872,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'event:cache')]
class EventCacheCommand extends Command
{
/**
* The name and signature of the console comm... | ile_put_contents(
$this->laravel->getCachedEventsPath(),
'<?php return '.var_export($this->getEvents(), true).';'
);
$this->components->info('Events cached successfully.');
}
/**
* Get all of the event | "Discover and cache the application's events and listeners";
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->callSilent('event:clear');
f | {
"filepath": "src/Illuminate/Foundation/Console/EventCacheCommand.php",
"language": "php",
"file_size": 1498,
"cut_index": 524,
"middle_length": 229
} |
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'event:clear')]
class EventClearCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
... | stem $files
*/
public function __construct(Filesystem $files)
{
parent::__construct();
$this->files = $files;
}
/**
* Execute the console command.
*
* @return void
*
* @throws \RuntimeExcepti | **
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new config clear command instance.
*
* @param \Illuminate\Filesystem\Filesy | {
"filepath": "src/Illuminate/Foundation/Console/EventClearCommand.php",
"language": "php",
"file_size": 1199,
"cut_index": 518,
"middle_length": 229
} |
e Illuminate\Console\Command;
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'event:generate')]
class EventGenerateCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $... | rn void
*/
public function handle()
{
$providers = $this->laravel->getProviders(EventServiceProvider::class);
foreach ($providers as $provider) {
foreach ($provider->listens() as $event => $listeners) {
| istration';
/**
* Indicates whether the command should be shown in the Artisan command list.
*
* @var bool
*/
protected $hidden = true;
/**
* Execute the console command.
*
* @retu | {
"filepath": "src/Illuminate/Foundation/Console/EventGenerateCommand.php",
"language": "php",
"file_size": 2122,
"cut_index": 563,
"middle_length": 229
} |
ate\Support\Collection;
use ReflectionFunction;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'event:list')]
class EventListCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'event:list
... | sResolver;
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$events = $this->getEvents()->sortKeys();
if ($events->isEmpty()) {
if ($this->option('json')) {
|
* @var string
*/
protected $description = "List the application's events and listeners";
/**
* The events dispatcher resolver callback.
*
* @var \Closure|null
*/
protected static $event | {
"filepath": "src/Illuminate/Foundation/Console/EventListCommand.php",
"language": "php",
"file_size": 7149,
"cut_index": 716,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:event')]
class EventMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
... | protected function alreadyExists($rawName)
{
return class_exists($rawName) ||
$this->files->exists($this->getPath($this->qualifyClass($rawName)));
}
/**
* Get the stub file for the generator.
*
* @return | * The type of class being generated.
*
* @var string
*/
protected $type = 'Event';
/**
* Determine if the class already exists.
*
* @param string $rawName
* @return bool
*/
| {
"filepath": "src/Illuminate/Foundation/Console/EventMakeCommand.php",
"language": "php",
"file_size": 1981,
"cut_index": 537,
"middle_length": 229
} |
e Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use function Laravel\Prompts\confirm;
#[AsCommand(name: 'make:exception')... | $type = 'Exception';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
if ($this->option('render')) {
return $this->option('report')
? __DIR_ | onsole command description.
*
* @var string
*/
protected $description = 'Create a new custom exception class';
/**
* The type of class being generated.
*
* @var string
*/
protected | {
"filepath": "src/Illuminate/Foundation/Console/ExceptionMakeCommand.php",
"language": "php",
"file_size": 2979,
"cut_index": 563,
"middle_length": 229
} |
hp
namespace Illuminate\Foundation\Console;
use Symfony\Component\Process\Process;
use function Illuminate\Support\php_binary;
trait InteractsWithComposerPackages
{
/**
* Installs the given Composer Packages into the application.
*
* @param string $composer
* @param array $packages
... | _MEMORY_LIMIT' => '-1']))
->setTimeout(null)
->run(function ($type, $output) {
$this->output->write($output);
});
}
/**
* Get the path to the appropriate PHP binary.
*
* @return st | $composer, 'require'];
}
$command = array_merge(
$command ?? ['composer', 'require'],
$packages,
);
return ! (new Process($command, $this->laravel->basePath(), ['COMPOSER | {
"filepath": "src/Illuminate/Foundation/Console/InteractsWithComposerPackages.php",
"language": "php",
"file_size": 1091,
"cut_index": 515,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:interface')]
class InterfaceMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var str... | n getStub()
{
return __DIR__.'/stubs/interface.stub';
}
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootName | /**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Interface';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected functio | {
"filepath": "src/Illuminate/Foundation/Console/InterfaceMakeCommand.php",
"language": "php",
"file_size": 1552,
"cut_index": 537,
"middle_length": 229
} |
e Illuminate\Console\Concerns\CreatesMatchingTest;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:job')]
class JobMakeCommand extends GeneratorCommand
{
use CreatesMatchingTest;
/**
* The... | ing
*/
protected function getStub()
{
if ($this->option('batched')) {
return $this->resolveStubPath('/stubs/job.batched.queued.stub');
}
return $this->option('sync')
? $this->resolveStubPath('/s | cription = 'Create a new job class';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Job';
/**
* Get the stub file for the generator.
*
* @return str | {
"filepath": "src/Illuminate/Foundation/Console/JobMakeCommand.php",
"language": "php",
"file_size": 2172,
"cut_index": 563,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\Concerns\CreatesMatchingTest;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:job-middleware')]
class JobMiddlewareMakeCommand extends GeneratorCommand
{
... | /**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return $this->resolveStubPath('/stubs/job.middleware.stub');
}
/**
* Resolve the fully-qualified path to th | tion.
*
* @var string
*/
protected $description = 'Create a new job middleware class';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Middleware';
| {
"filepath": "src/Illuminate/Foundation/Console/JobMiddlewareMakeCommand.php",
"language": "php",
"file_size": 1825,
"cut_index": 537,
"middle_length": 229
} |
" d="m0 0v-0.49449h1.7215v-4.3497l-1.6849-0.00916v-0.40291c1.3278 0 1.6849-0.22893 1.8131-1.1538h0.43954v5.9155h1.7399v0.49449h-4.0292z"/>
<path id="b" d="m0 0c-1.3186 0-2.1062-1.227-2.1062-3.2965 0-2.0696 0.78752-3.2966 2.1062-3.2966s2.1062 1.227 2.1062 3.2966c0 2.0695-0.78752 3.2965-2.1062 3.2965zm0-3.8918c0.3205 0 0... | 4AB|AB2ABAB3A212.AB3AB3A|8ABA212.7ABA|ABAB2AB3A212.2ABAB4A|10A212.6AB2A|2AB2ABAB2A32.9A61.9A73.9A19.AB2AB4A|9AB28.5AB2AB2AB4A3.10A6.25A10.5AB2AB2AB4A4.9A4.9A20.11A9.5AB2AB2AB5A15.7ABA|ABABAB4A25.4ABAB9AB4A.2AB3AB2AB6.2AB2AB2ABAB2AB2ABAB2AB3A7.4ABAB9AB5A.2A | 2 0-1.7857-0.55859-2.8021-1.5567-2.8021s-1.5567 1.0164-1.5567 2.8021c0 1.7856 0.55859 2.802 1.5567 2.802z"/>
</defs>
</svg>
<script>
(()=>{
const d="10A212.9A|AB2AB2AB2A212.2AB2AB2AB|6AB3A212.4AB4A|2ABAB3ABA212.AB4AB2A|10A212.3AB | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/laravel-ascii.blade.php",
"language": "php",
"file_size": 3816,
"cut_index": 614,
"middle_length": 229
} |
soleOutput;
use Symfony\Component\ErrorHandler\Error\FatalError;
use Throwable;
class HandleExceptions
{
/**
* Reserved memory so that errors can be displayed properly on memory exhaustion.
*
* @var string|null
*/
public static $reservedMemory;
/**
* The application instance.
... | set_error_handler($this->forwardsTo('handleError'));
set_exception_handler($this->forwardsTo('handleException'));
register_shutdown_function($this->forwardsTo('handleShutdown'));
if (! $app->environment('testing')) {
| dation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
static::$reservedMemory = str_repeat('x', 32768);
static::$app = $app;
error_reporting(-1);
| {
"filepath": "src/Illuminate/Foundation/Bootstrap/HandleExceptions.php",
"language": "php",
"file_size": 9373,
"cut_index": 921,
"middle_length": 229
} |
use Dotenv\Dotenv;
use Dotenv\Exception\InvalidFileException;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\Env;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
class LoadEnvironmentVariables
{
/**
* Bootstrap the given application.
... | rorAndDie($e);
}
}
/**
* Detect if a custom environment file matching the APP_ENV exists.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
protected function checkForSpecificEnvi | ed()) {
return;
}
$this->checkForSpecificEnvironmentFile($app);
try {
$this->createDotenv($app)->safeLoad();
} catch (InvalidFileException $e) {
$this->writeEr | {
"filepath": "src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php",
"language": "php",
"file_size": 2774,
"cut_index": 563,
"middle_length": 229
} |
nate\Foundation\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Http\Request;
class SetRequestForConsole
{
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Appli... | r, [
'SCRIPT_FILENAME' => $components['path'],
'SCRIPT_NAME' => $components['path'],
]);
}
$app->instance('request', Request::create(
$uri, 'GET', [], [], [], $server
));
| 'path'])) {
$server = array_merge($serve | {
"filepath": "src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php",
"language": "php",
"file_size": 847,
"cut_index": 535,
"middle_length": 52
} |
lluminate\Queue\Failed\CountableFailedJobProvider;
use Illuminate\Queue\Failed\FailedJobProviderInterface;
use Illuminate\Queue\Failed\PrunableFailedJobProvider;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
use RuntimeException;
class FailedJobProvider implements FailedJobProviderInterface, Countab... | d FailedJobProviderInterface $failer,
protected Events $events,
protected StringEncrypter $encrypter,
) {
//
}
/**
* Log a failed job into storage.
*
* @param string $connection
* @param string $ | **
* The loaded failed jobs keyed by ID.
*
* @var array<string, object>
*/
protected $loadedFailedJobs = [];
/**
* Create a new instance.
*/
public function __construct(
protecte | {
"filepath": "src/Illuminate/Foundation/Cloud/FailedJobProvider.php",
"language": "php",
"file_size": 5217,
"cut_index": 716,
"middle_length": 229
} |
tracts\Queue\Job|null
*/
protected $processingJob = null;
/**
* The queue for the currently processing job.
*
* @var string|null
*/
protected $processingQueue = null;
/**
* The date the last job started processing.
*
* @var \Carbon\CarbonImmutable
*/
pr... | return $this->queue->size(...func_get_args());
}
/**
* Get the number of pending jobs.
*
* @param string|null $queue
* @return int
*/
public function pendingSize($queue = null)
{
return $this->queue->p | events,
protected array $config,
) {
//
}
/**
* Get the size of the queue.
*
* @param string|null $queue
* @return int
*/
public function size($queue = null)
{
| {
"filepath": "src/Illuminate/Foundation/Cloud/Queue.php",
"language": "php",
"file_size": 9650,
"cut_index": 921,
"middle_length": 229
} |
Illuminate\Support\Fluent;
trait Dispatchable
{
/**
* Dispatch the job with the given arguments.
*
* @param mixed ...$arguments
* @return \Illuminate\Foundation\Bus\PendingDispatch
*/
public static function dispatch(...$arguments)
{
return static::newPendingDispatch(new ... | ispatchable = new static(...$arguments);
return value($boolean, $dispatchable)
? static::newPendingDispatch($dispatchable)
: new Fluent;
}
return value($boolean)
? static::newPending | arguments
* @return \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent
*/
public static function dispatchIf($boolean, ...$arguments)
{
if ($boolean instanceof Closure) {
$d | {
"filepath": "src/Illuminate/Foundation/Bus/Dispatchable.php",
"language": "php",
"file_size": 3123,
"cut_index": 614,
"middle_length": 229
} |
tracts\Cache\Repository as Cache;
use Illuminate\Contracts\Queue\PreparesForDispatch;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Foundation\Queue\InteractsWithUniqueJobs;
use Illuminate\Queue\Attributes\DebounceFor;
use Illuminate\Queue\Attributes\ReadsQueueAttributes;
use Illuminate\Support\Traits\C... | tch.
*
* @param mixed $job
*/
public function __construct($job)
{
$this->job = $job;
}
/**
* Set the desired connection for the job.
*
* @param \BackedEnum|string|null $connection
* @return $t | rotected $job;
/**
* Indicates if the job should be dispatched immediately after sending the response.
*
* @var bool
*/
protected $afterResponse = false;
/**
* Create a new pending job dispa | {
"filepath": "src/Illuminate/Foundation/Bus/PendingDispatch.php",
"language": "php",
"file_size": 6767,
"cut_index": 716,
"middle_length": 229
} |
vel-exceptions-renderer::section-container class="px-6 py-0 sm:py-0">
<x-laravel-exceptions-renderer::topbar :title="$exception->title()" :markdown="$exceptionAsMarkdown" />
</x-laravel-exceptions-renderer::section-container>
<x-laravel-exceptions-renderer::separator />
<x-laravel-exceptions-rende... | ception->previousExceptions()->isNotEmpty())
<x-laravel-exceptions-renderer::previous-exceptions :$exception />
@endif
<x-laravel-exceptions-renderer::query :queries="$exception->applicationQueries()" />
</x-laravel-excepti | aravel-exceptions-renderer::separator class="-mt-5 -z-10" />
<x-laravel-exceptions-renderer::section-container class="flex flex-col gap-8 pt-14">
<x-laravel-exceptions-renderer::trace :$exception />
@if ($ex | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/show.blade.php",
"language": "php",
"file_size": 2074,
"cut_index": 563,
"middle_length": 229
} |
ded: {{ $frame->isMain() ? 'true' : 'false' }},
hasCode: {{ $frame->snippet() ? 'true' : 'false' }}
}"
class="group rounded-lg border border-neutral-200 dark:border-white/10 overflow-hidden shadow-xs"
:class="{ 'dark:border-white/5': expanded }"
>
<div
class="flex h-11 items-center gap-3... | nter justify-center flex-shrink-0">
<div
class="size-2 rounded-full"
:class="{
'bg-rose-500 dark:bg-neutral-400': expanded,
'bg-rose-200 dark:bg-neutral-700': !expanded
}"
></div>
| 'dark:bg-white/5 rounded-t-lg': expanded,
'dark:bg-white/3 rounded-lg': !expanded
}"
@click="hasCode && (expanded = !expanded)"
>
{{-- Dot --}}
<div class="flex size-3 items-ce | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/frame.blade.php",
"language": "php",
"file_size": 2281,
"cut_index": 563,
"middle_length": 229
} |
v
class="relative text-neutral-400 dark:text-neutral-400"
x-data="{ spotlight: { x: 0, y: 0 } }"
@mousemove="const rect = $el.getBoundingClientRect(); spotlight = { x: $event.clientX - rect.left, y: $event.clientY - rect.top }">
<div
class="absolute w-full text-neutral-800 dark:text-neutral-100"... | le at ' +
spotlight.x +
'px ' +
spotlight.y +
'px, black 0%, transparent ' + (isDark ? '600px' : '400px') + ');'
">
<x-laravel-exceptions-renderer::icons.laravel-ascii />
< | gradient(circle at ' +
spotlight.x +
'px ' +
spotlight.y +
'px, black 0%, transparent ' + (isDark ? '150px' : '120px') + '); -webkit-mask-image: radial-gradient(circ | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/laravel-ascii-spotlight.blade.php",
"language": "php",
"file_size": 1072,
"cut_index": 515,
"middle_length": 229
} |
derer')
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
<title>{{ config('app.name', 'Laravel') }}</title>
<link
rel="icon" type="image/svg+xml"
... | -.694v-32.916c0-.072.01-.142.028-.21.006-.023.02-.044.028-.067.015-.042.029-.085.051-.124.015-.026.037-.047.055-.071.023-.032.044-.065.071-.093.023-.023.053-.04.079-.06.029-.024.055-.05.088-.069h.001l9.61-5.533a.802.802 0 0 1 .8 0l9.61 5.533h.002c.032.02.0 | 4l-9.209 5.302v10.509c0 .286-.152.55-.4.694l-19.223 11.066c-.044.025-.092.041-.14.058-.018.006-.035.017-.054.022a.805.805 0 0 1 -.41 0c-.022-.006-.042-.018-.063-.026-.044-.016-.09-.03-.132-.054l-19.219-11.066a.801.801 0 0 1 -.402 | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/layout.blade.php",
"language": "php",
"file_size": 2693,
"cut_index": 563,
"middle_length": 229
} |
uest'])
<div
x-data="{
copied: false,
async copyToClipboard() {
try {
await window.copyToClipboard('{{ $request->fullUrl() }}');
this.copied = true;
setTimeout(() => { this.copied = false }, 3000);
} catch (err) {
... | l-exceptions-renderer::icons.alert class="w-2.5 h-2.5" />
{{ $exception->httpStatusCode() }}
</x-laravel-exceptions-renderer::badge>
<x-laravel-exceptions-renderer::http-method method="{{ $request->method() }}" />
<div c | -white/10 rounded-lg flex items-center justify-between h-10 px-2 shadow-xs"]) }}
>
<div class="flex items-center gap-3 w-full">
<x-laravel-exceptions-renderer::badge type="error" variant="solid">
<x-larave | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/request-url.blade.php",
"language": "php",
"file_size": 1894,
"cut_index": 537,
"middle_length": 229
} |
uting'])
<div class="flex flex-col gap-3">
<h2 class="text-lg font-semibold">Routing</h2>
<div class="flex flex-col">
@forelse ($routing as $key => $value)
<div class="flex max-w-full items-baseline gap-2 h-10 text-sm font-mono">
<div class="uppercase text-neutral-500 dark:text-neut... | tippy-content="{{ $value }}">
{{ $value }}
</span>
</div>
</div>
@empty
<x-laravel-exceptions-renderer::empty-state message="No routing context" />
@endforelse
</div>
</div | al-900 dark:text-white">
<span data- | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/routing.blade.php",
"language": "php",
"file_size": 833,
"cut_index": 523,
"middle_length": 52
} |
'language',
'editor' => false,
'startingLine' => 1,
'highlightedLine' => null,
'truncate' => false,
])
@php
$fallback = $truncate ? '<pre class="truncate"><code>' : '<pre><code>';
if ($editor) {
$lines = explode("\n", $code);
foreach ($lines as $index => $line) {
$... | eutral-600!',
$highlight ? 'dark:text-white!' : '',
]);
$fallback .= '<span class="' . $lineClass . '">';
$fallback .= '<span class="' . $lineNumberClass . '">' . $lineNumber . '</span>';
$fa | te/2 even:dark:bg-white/2 odd:dark:bg-white/4',
$highlight ? 'bg-rose-200! dark:bg-rose-900!' : '',
]);
$lineNumberClass = implode(' ', [
'mr-6 text-neutral-500! dark:text-n | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/syntax-highlight.blade.php",
"language": "php",
"file_size": 1843,
"cut_index": 537,
"middle_length": 229
} |
eption'])
<div class="flex flex-col gap-2.5 bg-neutral-50 dark:bg-white/1 border border-neutral-200 dark:border-neutral-800 rounded-xl p-2.5 shadow-xs">
<div class="flex items-center gap-2.5 p-2">
<div class="bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/5 rounded-md w-6 h-6 flex... | ral-400 hover:text-blue-500 dark:hover:text-emerald-500 transition-colors">
{{ $exception->previousExceptions()->count() }} previous {{ \Illuminate\Support\Str::plural('exception', $exception->previousExceptions()->count()) }}
< | e font-semibold text-neutral-900 dark:text-white">Exception trace</h3>
@if ($exception->previousExceptions()->isNotEmpty())
<a href="#previous-exceptions" class="ml-auto text-sm text-neutral-500 dark:text-neut | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/trace.blade.php",
"language": "php",
"file_size": 1491,
"cut_index": 524,
"middle_length": 229
} |
<div
x-data="{ expanded: false }"
class="group rounded-lg border border-neutral-200 dark:border-white/5"
:class="{
'bg-white dark:bg-white/5 shadow-xs': expanded,
'border-dashed border-neutral-300 bg-neutral-50 opacity-90 dark:border-white/10 dark:bg-white/1': !expanded,
}"
>
<div
... | <div class="flex-1 font-mono text-xs leading-3 text-neutral-900 dark:text-neutral-400">
{{ count($frames)}} vendor {{ Str::plural('frame', count($frames))}}
</div>
<button
x-cloak
type="button"
| ons-renderer::icons.folder class="w-3 h-3 text-neutral-400" x-show="!expanded" x-cloak />
<x-laravel-exceptions-renderer::icons.folder-open class="w-3 h-3 text-blue-500 dark:text-emerald-500" x-show="expanded" />
| {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/vendor-frames.blade.php",
"language": "php",
"file_size": 2060,
"cut_index": 563,
"middle_length": 229
} |
ication;
use Illuminate\Support\Collection;
use SplFileInfo;
use Symfony\Component\Finder\Finder;
class LoadConfiguration
{
/**
* The closure that resolves the permanent, static configuration if applicable.
*
* @var (Closure(Application): array<array-key, mixed>)|null
*/
protected static ?C... | . Otherwise
// we will need to spin through every configuration file and load them all.
$loadedFromCache = false;
if (self::$alwaysUseConfig !== null) {
$items = $app->call(self::$alwaysUseConfig);
$loadedF | function bootstrap(Application $app)
{
$items = [];
// First we will see if we have a cache configuration file. If we do, we'll load
// the configuration items from that file so that it is very quick | {
"filepath": "src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php",
"language": "php",
"file_size": 6852,
"cut_index": 716,
"middle_length": 229
} |
use Throwable;
class Events
{
/**
* The cloud socket.
*
* @var resource|null
*/
protected $socket = null;
/**
* Create a new instance.
*/
public function __construct(protected string $address)
{
//
}
/**
* Emit an event.
*
* @param arr... | this->write($this->format($payloads));
} catch (Throwable) {
//
}
}
/**
* Write the payload to the socket.
*
* @param list<array<string, mixed>> $payloads
*/
protected function write(string $pa | <array<string, mixed>> $payloads
*/
public function emitMany(array $payloads): void
{
if ($payloads === []) {
return;
}
try {
$this->ensureConnected();
$ | {
"filepath": "src/Illuminate/Foundation/Cloud/Events.php",
"language": "php",
"file_size": 4964,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Foundation\Routing;
use Illuminate\Routing\ControllerDispatcher;
use Illuminate\Routing\Route;
use RuntimeException;
class PrecognitionControllerDispatcher extends ControllerDispatcher
{
/**
* Dispatch a request to a given controller and method.
*
* @param \Illuminate\Routing\Route... | the controller.
*
* @param object $controller
* @param string $method
* @return $this
*
* @throws \RuntimeException
*/
protected function ensureMethodExists($controller, $method)
{
if (method_exists($ | reMethodExists($controller, $method);
$this->resolveParameters($route, $controller, $method);
abort(204, headers: ['Precognition-Success' => 'true']);
}
/**
* Ensure that the given method exists on | {
"filepath": "src/Illuminate/Foundation/Routing/PrecognitionControllerDispatcher.php",
"language": "php",
"file_size": 1258,
"cut_index": 524,
"middle_length": 229
} |
n;
use Illuminate\Support\Traits\Conditionable;
use Laravel\SerializableClosure\SerializableClosure;
use function Illuminate\Support\enum_value;
class PendingChain
{
use Conditionable;
/**
* The class name of the job being dispatched.
*
* @var mixed
*/
public $job;
/**
* The... | * @var \DateTimeInterface|\DateInterval|int|null
*/
public $delay;
/**
* The callbacks to be executed on failure.
*
* @var array
*/
public $catchCallbacks = [];
/**
* Create a new PendingChain instance.
| ic $connection;
/**
* The name of the queue the chain should be sent to.
*
* @var string|null
*/
public $queue;
/**
* The number of seconds before the chain should be made available.
*
| {
"filepath": "src/Illuminate/Foundation/Bus/PendingChain.php",
"language": "php",
"file_size": 5265,
"cut_index": 716,
"middle_length": 229
} |
t', 'variant' => 'soft'])
@php
$baseClasses = 'inline-flex w-fit shrink-0 items-center justify-center gap-1 font-mono leading-3 uppercase transition-colors dark:border [&_svg]:size-2.5 h-6 min-w-5 rounded-md px-1.5 text-xs/none';
$types = [
'default' => [
'soft' => 'bg-black/8 text-neutral-900 dark:border... | => 'bg-blue-100 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300',
'solid' => 'bg-blue-700 dark:border-blue-600 dark:bg-blue-700',
],
'error' => [
'soft' => 'bg-rose-200 text-rose-900 dark:border-rose-900 dark | => 'bg-emerald-200 text-emerald-900 dark:border-emerald-600 dark:bg-emerald-900/70 dark:text-emerald-400',
'solid' => 'bg-emerald-600 dark:border-emerald-500 dark:bg-emerald-600',
],
'primary' => [
'soft' | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/badge.blade.php",
"language": "php",
"file_size": 1986,
"cut_index": 537,
"middle_length": 229
} |
x-data="{
totalQueries: {{ min(count($queries), 100) }},
currentPage: 1,
perPage: 10,
get totalPages() {
return Math.ceil(this.totalQueries / this.perPage);
},
get hasPrevious() {
return this.currentPage > 1;
},
get hasNext() {
... | this.currentPage--;
}
},
next() {
if (this.hasNext) {
this.currentPage++;
}
},
get visiblePages() {
const total = this.totalPages;
const current = t | }
},
first() {
this.currentPage = 1;
},
last() {
this.currentPage = this.totalPages;
},
previous() {
if (this.hasPrevious) {
| {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/query.blade.php",
"language": "php",
"file_size": 8341,
"cut_index": 716,
"middle_length": 229
} |
arkdown = {{ Illuminate\Support\Js::from($markdown) }}
</script>
<div
class="flex items-center justify-between"
x-data="{
copied: false,
async copyToClipboard() {
try {
await window.copyToClipboard(markdown);
this.copied = true;
setTim... | //www.w3.org/2000/svg">
<path d="M1.00006 6.3188C1.41416 6.3188 1.75006 5.98295 1.75006 5.56885V1.43115C1.75006 1.01705 1.41416 0.681152 1.00006 0.681152C0.585961 0.681152 0.250061 1.01705 0.250061 1.43115V5.56885C0.250061 5.98295 0.585961 | x items-center gap-2 h-[56px]">
<div class="w-[18px] h-[18px] flex items-center justify-center bg-rose-500 rounded-md">
<svg width="2" height="10" class="text-white" viewBox="0 0 2 10" fill="none" xmlns="http: | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/topbar.blade.php",
"language": "php",
"file_size": 2228,
"cut_index": 563,
"middle_length": 229
} |
width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
<path d="M5.99996 10.6876C7.10936 10.6876 8.00871 8.58896 8.00871 6.00012C8.00871 3.41129 7.10936 1.31262 5.99996 1.31262C4.89056 1.31262 3.99121 3.41129 3.99121 6.00012C3.99121 8.58896 4.89056 10.6876 5.999... | M6 10.6876C8.58883 10.6876 10.6875 8.58896 10.6875 6.00012C10.6875 3.41129 8.58883 1.31262 6 1.31262C3.41117 1.31262 1.3125 3.41129 1.3125 6.00012C1.3125 8.58896 3.41117 10.6876 6 10.6876Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="roun |
<path d=" | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/globe.blade.php",
"language": "php",
"file_size": 799,
"cut_index": 517,
"middle_length": 14
} |
n;
use Aws\Sqs\SqsClient;
use Illuminate\Foundation\Application;
use Illuminate\Queue\Connectors\ConnectorInterface;
use Illuminate\Queue\Events\JobQueued;
use Illuminate\Queue\Events\WorkerStopping;
use Illuminate\Queue\SqsQueue;
use Illuminate\Queue\Worker;
use Illuminate\Queue\WorkerStopReason;
use Psr\Http\Message\... | **
* Establish a queue connection.
*/
public function connect(array $config): Queue
{
$underlying = $this->connector->connect($config['connection']);
$queue = new Queue(
$underlying,
$this->app[Eve | ?string $reservedMemory = null;
/**
* Create a new instance.
*/
public function __construct(
protected ConnectorInterface $connector,
protected Application $app,
) {
//
}
/ | {
"filepath": "src/Illuminate/Foundation/Cloud/QueueConnector.php",
"language": "php",
"file_size": 3972,
"cut_index": 614,
"middle_length": 229
} |
iv class="flex flex-col pt-8 sm:pt-16 overflow-x-auto">
<div class="flex flex-col gap-5 mb-8">
<h1 class="text-3xl font-semibold text-neutral-950 dark:text-white">{{ $exception->class() }}</h1>
<x-laravel-exceptions-renderer::file-with-line :frame="$exception->frames()->first()" class="-mt-3 text-xs... | lex items-center gap-1.5 h-6 px-[6px] font-mono text-[13px]">
<span class="text-neutral-400 dark:text-neutral-500">LARAVEL</span>
<span class="text-neutral-500 dark:text-neutral-300">{{ app()->version() }}</span>
| sm:mb-16">
<div class="bg-white dark:bg-white/[3%] border border-neutral-200 dark:border-white/10 divide-x divide-neutral-200 dark:divide-white/10 rounded-md shadow-xs flex items-center gap-0.5">
<div class="f | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/header.blade.php",
"language": "php",
"file_size": 1837,
"cut_index": 537,
"middle_length": 229
} |
0" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
<g clip-path="url(#clip0_14732_6105)">
<path d="M9.87466 7.8287L5.92654 0.549947C5.82917 0.369362 5.68068 0.221523 5.49966 0.124947C5.25374 -0.00665839 4.9658 -0.0358401 4.69847 0.0437494C4.43115 0.123339 4.20606 0.3052... | 99 8.35791 9.99595 8.22059C9.98199 8.08328 9.94036 7.95009 9.87466 7.8287ZM4.99966 8.12495C4.87605 8.12495 4.75521 8.08829 4.65243 8.01962C4.54965 7.95094 4.46954 7.85333 4.42224 7.73912C4.37493 7.62492 4.36256 7.49925 4.38667 7.37802C4.41079 7.25678 4.470 | .24031C0.692391 9.32951 0.871462 9.37591 1.05341 9.37495H8.94591C9.12031 9.37495 9.29203 9.33202 9.44591 9.24995C9.56783 9.18524 9.67572 9.09703 9.76338 8.99041C9.85104 8.8838 9.91672 8.76088 9.95663 8.62876C9.99655 8.49663 10.00 | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/alert.blade.php",
"language": "php",
"file_size": 1933,
"cut_index": 537,
"middle_length": 229
} |
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
class RegisterProviders
{
/**
* The service providers that should be merged before registration.
*
* @var array
*/
protected static $merge = [];
/**
* The path to the bootstrap provider config... | {
$this->mergeAdditionalProviders($app);
}
$app->registerConfiguredProviders();
}
/**
* Merge the additional configured providers into the configuration.
*
* @param \Illuminate\Foundation\Application $ | oundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
if (! $app->bound('config_loaded_from_cache') ||
$app->make('config_loaded_from_cache') === false) | {
"filepath": "src/Illuminate/Foundation/Bootstrap/RegisterProviders.php",
"language": "php",
"file_size": 2572,
"cut_index": 563,
"middle_length": 229
} |
s="flex items-center gap-2.5 p-2">
<div class="bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/5 rounded-md w-6 h-6 flex items-center justify-center p-1">
<x-laravel-exceptions-renderer::icons.alert class="w-2.5 h-2.5 text-blue-500 dark:text-emerald-500" />
</div>
... | previousExceptions()->count() > 1)
<div class="flex flex-col items-center w-6 flex-shrink-0 self-stretch">
@if ($index > 0)
<div class="h-[23.5px] w-px border-l border-dashed border-em | >
<div class="flex flex-col">
@foreach ($exception->previousExceptions() as $index => $previous)
<div class="flex gap-2.5 px-2">
{{-- Timeline column --}}
@if ($exception-> | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/previous-exceptions.blade.php",
"language": "php",
"file_size": 5154,
"cut_index": 716,
"middle_length": 229
} |
}} - {!! $exception->title() !!}
{!! $exception->message() !!}
PHP {{ PHP_VERSION }}
Laravel {{ app()->version() }}
{{ $exception->request()->httpHost() }}
## Stack Trace
@foreach($exception->frames() as $index => $frame)
{{ $index }} - {{ $frame->file() }}:{{ $frame->line() }}
@endforeach
@if ($exception->previou... | # Request
{{ $exception->request()->method() }} {{ \Illuminate\Support\Str::start($exception->request()->path(), '/') }}
## Headers
@forelse ($exception->requestHeaders() as $key => $value)
* **{{ $key }}**: {!! $value !!}
@empty
No header data availabl | previous)
### {{ $index + 1 }}. {{ $previous->class() }}
{!! $previous->message() !!}
@foreach($previous->frames() as $index => $frame)
{{ $index }} - {{ $frame->file() }}:{{ $frame->line() }}
@endforeach
@endforeach
@endif
# | {
"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/markdown.blade.php",
"language": "php",
"file_size": 1623,
"cut_index": 537,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:request')]
class RequestMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
... | on getStub()
{
return $this->resolveStubPath('/stubs/request.stub');
}
/**
* Resolve the fully-qualified path to the stub.
*
* @param string $stub
* @return string
*/
protected function resolveStubPath($s |
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Request';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected functi | {
"filepath": "src/Illuminate/Foundation/Console/RequestMakeCommand.php",
"language": "php",
"file_size": 1703,
"cut_index": 537,
"middle_length": 229
} |
e Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:resource')]
class ResourceMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $n... | on()) {
$this->type = 'Resource collection';
}
parent::handle();
}
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return match (true) | s being generated.
*
* @var string
*/
protected $type = 'Resource';
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
if ($this->collecti | {
"filepath": "src/Illuminate/Foundation/Console/ResourceMakeCommand.php",
"language": "php",
"file_size": 2633,
"cut_index": 563,
"middle_length": 229
} |
acades\File;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:view')]
class ViewMakeCommand extends GeneratorCommand
{
use CreatesMatchingTest;
/**
* The console comma... | string $name
* @return string
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
protected function buildClass($name)
{
$contents = parent::buildClass($name);
return str_replace(
| */
protected $name = 'make:view';
/**
* The type of file being generated.
*
* @var string
*/
protected $type = 'View';
/**
* Build the class with the given name.
*
* @param | {
"filepath": "src/Illuminate/Foundation/Console/ViewMakeCommand.php",
"language": "php",
"file_size": 6281,
"cut_index": 716,
"middle_length": 229
} |
lth;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as AppEventServiceProvider;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as AppRouteServiceProvider;
use Illuminate\Http\Middleware\PrefersJsonResponses;
... | /**
* Any additional routing callbacks that should be invoked while registering routes.
*
* @var array
*/
protected array $additionalRoutingCallbacks = [];
/**
* The Folio / page middleware that have been defined by the | nate\Support\Facades\View;
use Laravel\Folio\Folio;
class ApplicationBuilder
{
/**
* The service provider that are marked for registration.
*
* @var array
*/
protected array $pendingProviders = [];
| {
"filepath": "src/Illuminate/Foundation/Configuration/ApplicationBuilder.php",
"language": "php",
"file_size": 16149,
"cut_index": 921,
"middle_length": 229
} |
{
/**
* Create a new exception handling configuration instance.
*
* @param \Illuminate\Foundation\Exceptions\Handler $handler
*/
public function __construct(public Handler $handler)
{
}
/**
* Register a reportable callback.
*
* @param callable $using
* @... | s->handler->reportable($reportUsing);
}
/**
* Register a renderable callback.
*
* @param callable $using
* @return $this
*/
public function render(callable $using)
{
$this->handler->renderable($using);
| gister a reportable callback.
*
* @param callable $reportUsing
* @return \Illuminate\Foundation\Exceptions\ReportableHandler
*/
public function reportable(callable $reportUsing)
{
return $thi | {
"filepath": "src/Illuminate/Foundation/Configuration/Exceptions.php",
"language": "php",
"file_size": 5529,
"cut_index": 716,
"middle_length": 229
} |
* The user defined global middleware stack.
*
* @var array
*/
protected $global = [];
/**
* The middleware that should be prepended to the global middleware stack.
*
* @var array
*/
protected $prepends = [];
/**
* The middleware that should be appended to the g... | ed middleware groups.
*
* @var array
*/
protected $groups = [];
/**
* The middleware that should be prepended to the specified groups.
*
* @var array
*/
protected $groupPrepends = [];
/**
* The midd | array
*/
protected $removals = [];
/**
* The middleware that should be replaced in the global middleware stack.
*
* @var array
*/
protected $replacements = [];
/**
* The user defin | {
"filepath": "src/Illuminate/Foundation/Configuration/Middleware.php",
"language": "php",
"file_size": 22610,
"cut_index": 1331,
"middle_length": 229
} |
<?php
namespace Illuminate\Foundation\Support\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array<class-string, class-string>
*/
protected ... | cy) {
Gate::policy($model, $policy);
}
}
/**
* Get the policies defined on the provider.
*
* @return array<class-string, class-string>
*/
public function policies()
{
return $this->policies;
| his->registerPolicies();
});
}
/**
* Register the application's policies.
*
* @return void
*/
public function registerPolicies()
{
foreach ($this->policies() as $model => $poli | {
"filepath": "src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php",
"language": "php",
"file_size": 1005,
"cut_index": 512,
"middle_length": 229
} |
Events;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\LazyCollection;
use Illuminate\Support\ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event handler mappings for the application.
*
* @var array<string, array<int, string... | $shouldDiscoverEvents = true;
/**
* The configured event discovery paths.
*
* @var iterable<int, string>|null
*/
protected static $eventDiscoveryPaths;
/**
* Register the application's event listeners.
*
* @ | ter.
*
* @var array<string, string|object|array<int, string|object>>
*/
protected $observers = [];
/**
* Indicates if events should be discovered.
*
* @var bool
*/
protected static | {
"filepath": "src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php",
"language": "php",
"file_size": 5693,
"cut_index": 716,
"middle_length": 229
} |
ng\UrlGenerator;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Traits\ForwardsCalls;
/**
* @mixin \Illuminate\Routing\Router
*/
class RouteServiceProvider extends ServiceProvider
{
use ForwardsCalls;
/**
* The controller namespace for the application.
... | k that should be used to load the application's cached routes.
*
* @var \Closure|null
*/
protected static $alwaysLoadCachedRoutesUsing;
/**
* Register any application services.
*
* @return void
*/
public func | otected $loadRoutesUsing;
/**
* The global callback that should be used to load the application's routes.
*
* @var \Closure|null
*/
protected static $alwaysLoadRoutesUsing;
/**
* The callbac | {
"filepath": "src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php",
"language": "php",
"file_size": 4420,
"cut_index": 614,
"middle_length": 229
} |
Scheduling\ScheduleTestCommand;
use Illuminate\Console\Scheduling\ScheduleWorkCommand;
use Illuminate\Console\Signals;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Database\Console\DbCommand;
use Illuminate\Database\Console\DumpCommand;
use Illuminate\Database\Console\Factories\FactoryMakeCommand... | nsole\WipeCommand;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Foundation\Console\ApiInstallCommand;
use Illuminate\Foundation\Console\BroadcastingInstallCommand;
use Illuminate\Foundation\Console\CastMakeCommand;
use Illuminate\Foundati | base\Console\Seeds\SeederMakeCommand;
use Illuminate\Database\Console\ShowCommand;
use Illuminate\Database\Console\ShowModelCommand;
use Illuminate\Database\Console\TableCommand as DatabaseTableCommand;
use Illuminate\Database\Co | {
"filepath": "src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php",
"language": "php",
"file_size": 28809,
"cut_index": 1331,
"middle_length": 229
} |
racts\Validation\ValidatesWhenResolved;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Routing\Redirector;
use Illuminate\Support\ServiceProvider;
class FormRequestServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function ... | $resolved->validateResolved();
});
$this->app->resolving(FormRequest::class, function ($request, $app) {
$request = FormRequest::createFrom($app['request'], $request);
$request->setContainer($app)->setRed | idatesWhenResolved::class, function ($resolved) {
| {
"filepath": "src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php",
"language": "php",
"file_size": 950,
"cut_index": 582,
"middle_length": 52
} |
Contracts\Foundation\MaintenanceMode as MaintenanceModeContract;
use Illuminate\Contracts\View\Factory;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Database\Grammar;
use Illuminate\Foundation\Console\CliDumper;
use Illuminate\Foundation\Exceptions\Renderer\Listener;
use Illuminate\Foundation\Exceptions\... | uminate\Support\AggregateServiceProvider;
use Illuminate\Support\Defer\DeferredCallbackCollection;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Uri;
use Illuminate\Testing\LoggedExceptionCollection;
use Illuminate\Testing\ParallelTestingServi | e\Foundation\Precognition;
use Illuminate\Foundation\Vite;
use Illuminate\Http\Client\Factory as HttpFactory;
use Illuminate\Http\Request;
use Illuminate\Log\Events\MessageLogged;
use Illuminate\Queue\Events\JobAttempted;
use Ill | {
"filepath": "src/Illuminate/Foundation/Providers/FoundationServiceProvider.php",
"language": "php",
"file_size": 9783,
"cut_index": 921,
"middle_length": 229
} |
<string, string>
*/
protected $editorHrefs = [
'antigravity' => 'antigravity://file/{file}:{line}',
'atom' => 'atom://core/open/file?filename={file}&line={line}',
'cursor' => 'cursor://file/{file}:{line}',
'emacs' => 'emacs://open?url=file://{file}&line={line}',
'fleet' ... | orm' => 'phpstorm://open?file={file}&line={line}',
'sublime' => 'subl://open?url=file://{file}&line={line}',
'textmate' => 'txmt://open?url=file://{file}&line={line}',
'trae' => 'trae://file/{file}:{line}',
'vscode' => 'vsco | {file}&line={line}',
'neovim' => 'nvim://open?url=file://{file}&line={line}',
'netbeans' => 'netbeans://open/?f={file}:{line}',
'nova' => 'nova://core/open/file?filename={file}&line={line}',
'phpst | {
"filepath": "src/Illuminate/Foundation/Concerns/ResolvesDumpSource.php",
"language": "php",
"file_size": 5985,
"cut_index": 716,
"middle_length": 229
} |
pace Illuminate\Foundation\Testing;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands;
trait DatabaseMigrations
{
use CanConfigureMigrationCommands;
/**
* Define hooks to migrate the database before and after each test.
*
* @return ... | *
* @return void
*/
protected function refreshTestDatabase()
{
$this->artisan('migrate:fresh', $this->migrateFreshUsing());
$this->app[Kernel::class]->setArtisan(null);
}
/**
* Perform any work that should | $this->beforeApplicationDestroyed(function () {
$this->artisan('migrate:rollback');
RefreshDatabaseState::$migrated = false;
});
}
/**
* Refresh a conventional test database.
| {
"filepath": "src/Illuminate/Foundation/Testing/DatabaseMigrations.php",
"language": "php",
"file_size": 1388,
"cut_index": 524,
"middle_length": 229
} |
te\Foundation\Testing;
trait DatabaseTransactions
{
/**
* Handle database transactions on the specified connections.
*
* @return void
*/
public function beginDatabaseTransaction()
{
$database = $this->app->make('db');
$connections = $this->connectionsToTransact();
... | eginTransaction();
$connection->setEventDispatcher($dispatcher);
}
$this->beforeApplicationDestroyed(function () use ($database) {
foreach ($this->connectionsToTransact() as $name) {
$connection = $d | e->connection($name);
$connection->setTransactionManager($transactionsManager);
$dispatcher = $connection->getEventDispatcher();
$connection->unsetEventDispatcher();
$connection->b | {
"filepath": "src/Illuminate/Foundation/Testing/DatabaseTransactions.php",
"language": "php",
"file_size": 1644,
"cut_index": 537,
"middle_length": 229
} |
te\Foundation\Testing;
use Illuminate\Database\DatabaseTransactionsManager as BaseManager;
class DatabaseTransactionsManager extends BaseManager
{
/**
* The names of the connections transacting during tests.
*/
protected array $connectionsTransacting;
/**
* Create a new database transactio... | // If there are no transactions, we'll run the callbacks right away. Also, we'll run it
// right away when we're in test mode and we only have the wrapping transaction. For
// every other case, we'll queue up the callback to run aft | his->connectionsTransacting = $connectionsTransacting;
}
/**
* Register a transaction callback.
*
* @param callable $callback
* @return void
*/
public function addCallback($callback)
{
| {
"filepath": "src/Illuminate/Foundation/Testing/DatabaseTransactionsManager.php",
"language": "php",
"file_size": 1853,
"cut_index": 537,
"middle_length": 229
} |
s;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
trait DatabaseTruncation
{
use CanConfigureMigrationCommands;
/**
* The cached names of the database tables for each connection.
*
* @var array
*/
protected static array $allTables;
/**
* Truncate the database ... | RefreshDatabaseState::$migrated = true;
return;
}
// Always clear any test data on subsequent runs...
$this->truncateTablesForAllConnections();
if ($seeder = $this->seeder()) {
// Use a spec | rate and seed the database on first run...
if (! RefreshDatabaseState::$migrated) {
$this->artisan('migrate:fresh', $this->migrateFreshUsing());
$this->app[Kernel::class]->setArtisan(null);
| {
"filepath": "src/Illuminate/Foundation/Testing/DatabaseTruncation.php",
"language": "php",
"file_size": 6255,
"cut_index": 716,
"middle_length": 229
} |
namespace Illuminate\Foundation\Testing;
trait LazilyRefreshDatabase
{
use RefreshDatabase {
refreshDatabase as baseRefreshDatabase;
}
/**
* Define hooks to migrate the database before and after each test.
*
* @return void
*/
public function refreshDatabase()
{
... | $this->baseRefreshDatabase();
if (property_exists($this, 'mockConsoleOutput')) {
$this->mockConsoleOutput = $shouldMockOutput;
}
};
$database->beforeStartingTransaction($callback);
| baseState::$lazilyRefreshed = true;
if (property_exists($this, 'mockConsoleOutput')) {
$shouldMockOutput = $this->mockConsoleOutput;
$this->mockConsoleOutput = false;
}
| {
"filepath": "src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php",
"language": "php",
"file_size": 1181,
"cut_index": 518,
"middle_length": 229
} |
ureMigrationCommands;
/**
* Define hooks to migrate the database before and after each test.
*
* @return void
*/
public function refreshDatabase()
{
$this->beforeRefreshingDatabase();
if ($this->usingInMemoryDatabases()) {
$this->restoreInMemoryDatabase();
... | e;
}
}
return false;
}
/**
* Determine if a given database connection is an in-memory database.
*
* @return bool
*/
protected function usingInMemoryDatabase(?string $name = null)
{
i | *
* @return bool
*/
protected function usingInMemoryDatabases()
{
foreach ($this->connectionsToTransact() as $name) {
if ($this->usingInMemoryDatabase($name)) {
return tru | {
"filepath": "src/Illuminate/Foundation/Testing/RefreshDatabase.php",
"language": "php",
"file_size": 5310,
"cut_index": 716,
"middle_length": 229
} |
te\Foundation\Application;
use Illuminate\Foundation\Testing\Attributes\UnitTest;
use PHPUnit\Framework\TestCase as BaseTestCase;
use ReflectionMethod;
use Throwable;
abstract class TestCase extends BaseTestCase
{
use Concerns\InteractsWithContainer,
Concerns\MakesHttpRequests,
Concerns\InteractsWi... | recursively.
*
* @var array<class-string, int>
*/
protected array $traitsUsedByTest;
/**
* Memoized result of the withoutBootingFramework check.
*
* @var bool|null
*/
protected ?bool $withoutBootingFramework | ing,
Concerns\InteractsWithSession,
Concerns\InteractsWithTime,
Concerns\InteractsWithTestCaseLifecycle,
Concerns\InteractsWithViews;
/**
* The list of trait that this test uses, fetched | {
"filepath": "src/Illuminate/Foundation/Testing/TestCase.php",
"language": "php",
"file_size": 3418,
"cut_index": 614,
"middle_length": 229
} |
hp
namespace Illuminate\Foundation\Testing;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Bootstrap\LoadConfiguration;
trait WithCachedConfig
{
/**
* After resolving the configuration once, we can cache it for the remaining tests.
*/
protected function setUpWithCachedConfig(): vo... |
{
LoadConfiguration::alwaysUse(null);
}
/**
* Inform the container that the configuration is cached.
*/
protected function markConfigCached(Application $app): void
{
$app->instance('config_loaded_from_cache', | is->app);
}
/**
* Reset the cached configuration.
*
* This is helpful if some of the tests in the suite apply this trait while others do not.
*/
protected function tearDownWithCachedConfig(): void | {
"filepath": "src/Illuminate/Foundation/Testing/WithCachedConfig.php",
"language": "php",
"file_size": 1099,
"cut_index": 515,
"middle_length": 229
} |
pace Illuminate\Foundation\Testing;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider;
trait WithCachedRoutes
{
/**
* After creating the routes once, we can cache them for the remaining tests.
*
* @return void
*/
protected function setU... | ot defaulting to loading cached routes.
*
* This is helpful if some of the tests in the suite apply this trait while others do not.
*
* @return void
*/
protected function tearDownWithCachedRoutes(): void
{
RouteServ | ;
$routes->refreshActionLookups();
CachedState::$cachedRoutes = $routes->compile();
}
$this->markRoutesCached($this->app);
}
/**
* Reset the route service provider so it's n | {
"filepath": "src/Illuminate/Foundation/Testing/WithCachedRoutes.php",
"language": "php",
"file_size": 1408,
"cut_index": 524,
"middle_length": 229
} |
namespace Illuminate\Foundation\Testing;
use Faker\Factory;
use Faker\Generator;
trait WithFaker
{
/**
* The Faker instance.
*
* @var \Faker\Generator
*/
protected $faker;
/**
* Setup up the Faker instance.
*
* @return void
*/
protected function setUpFaker()
... | string|null $locale
* @return \Faker\Generator
*/
protected function makeFaker($locale = null)
{
if (isset($this->app)) {
$locale ??= $this->app->make('config')->get('app.faker_locale', Factory::DEFAULT_LOCALE);
| tor
*/
protected function faker($locale = null)
{
return is_null($locale) ? $this->faker : $this->makeFaker($locale);
}
/**
* Create a Faker instance for the given locale.
*
* @param | {
"filepath": "src/Illuminate/Foundation/Testing/WithFaker.php",
"language": "php",
"file_size": 1237,
"cut_index": 518,
"middle_length": 229
} |
* Create a new wormhole instance.
*
* @param int $value
*/
public function __construct($value)
{
$this->value = $value;
}
/**
* @template TReturn of mixed
*
* Travel forward the given number of microseconds.
*
* @param (callable(): TReturn)|null $c... | n microseconds($callback = null)
{
Carbon::setTestNow(Carbon::now()->addMicroseconds($this->value));
return $this->handleCallback($callback);
}
/**
* @template TReturn of mixed
*
* Travel forward the given numbe | @template TReturn of mixed
*
* Travel forward the given number of microseconds.
*
* @param (callable(): TReturn)|null $callback
* @return ($callback is null ? void : TReturn)
*/
public functio | {
"filepath": "src/Illuminate/Foundation/Testing/Wormhole.php",
"language": "php",
"file_size": 7458,
"cut_index": 716,
"middle_length": 229
} |
ts;
use Illuminate\Foundation\Testing\Attributes\Seed;
use Illuminate\Foundation\Testing\Attributes\Seeder;
use ReflectionClass;
trait CanConfigureMigrationCommands
{
/**
* The parameters that should be used when running "migrate:fresh".
*
* @return array
*/
protected function migrateFresh... | * @return bool
*/
protected function shouldDropViews()
{
return property_exists($this, 'dropViews') ? $this->dropViews : false;
}
/**
* Determine if types should be dropped when refreshing the database.
*
* @ret | >shouldDropTypes(),
],
$seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()]
);
}
/**
* Determine if views should be dropped when refreshing the database.
*
| {
"filepath": "src/Illuminate/Foundation/Testing/Traits/CanConfigureMigrationCommands.php",
"language": "php",
"file_size": 2193,
"cut_index": 563,
"middle_length": 229
} |
e as UserContract;
trait InteractsWithAuthentication
{
/**
* Set the currently logged in user for the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string|null $guard
* @return $this
*/
public function actingAs(UserContract $user, $guard = n... | ly logged in user for the application.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string|null $guard
* @return $this
*/
public function be(UserContract $user, $guard = null)
{
if (isset |
*/
public function actingAsGuest($guard = null)
{
$this->app['auth']->guard($guard)->forgetUser();
$this->app['auth']->shouldUse($guard);
return $this;
}
/**
* Set the current | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php",
"language": "php",
"file_size": 4346,
"cut_index": 614,
"middle_length": 229
} |
erns;
use Illuminate\Console\OutputStyle;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Testing\PendingCommand;
trait InteractsWithConsole
{
/**
* Indicates if the console output should be mocked.
*
* @var bool
*/
public $mockConsoleOutput = true;
/**
* Indicates if the... | pected to be displayed.
*
* @var array
*/
public $unexpectedOutput = [];
/**
* All of the text that is not expected to be present in the output.
*
* @var array
*/
public $unexpectedOutputSubstrings = [];
| public $expectedOutput = [];
/**
* All of the expected text to be present in the output.
*
* @var array
*/
public $expectedOutputSubstrings = [];
/**
* All of the output lines that aren't ex | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php",
"language": "php",
"file_size": 2134,
"cut_index": 563,
"middle_length": 229
} |
e\Support\Facades\Vite as ViteFacade;
use Illuminate\Support\HtmlString;
use Mockery;
trait InteractsWithContainer
{
/**
* The original Vite handler.
*
* @var \Illuminate\Foundation\Vite|null
*/
protected $originalVite;
/**
* The original Laravel Mix handler.
*
* @var \I... | ram TSwap $instance
* @return TSwap
*/
protected function swap($abstract, $instance)
{
return $this->instance($abstract, $instance);
}
/**
* Register an instance of an object in the container.
*
* @templa | ction|null
*/
protected $originalDeferredCallbacksCollection;
/**
* Register an instance of an object in the container.
*
* @template TSwap of object
*
* @param string $abstract
* @pa | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php",
"language": "php",
"file_size": 7160,
"cut_index": 716,
"middle_length": 229
} |
se;
use Illuminate\Testing\Constraints\SoftDeletedInDatabase;
use PHPUnit\Framework\Constraint\LogicalNot as ReverseConstraint;
trait InteractsWithDatabase
{
/**
* Assert that a given where condition exists in the database.
*
* @param iterable<\Illuminate\Database\Eloquent\Model>|\Illuminate\Databa... | nnection);
}
return $this;
}
if ($data !== [] && array_is_list($data) && array_all($data, fn ($row) => is_array($row))) {
foreach ($data as $row) {
$this->assertDatabaseHas($table, $row, | */
protected function assertDatabaseHas($table, array $data = [], $connection = null)
{
if (is_iterable($table)) {
foreach ($table as $item) {
$this->assertDatabaseHas($item, $data, $co | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php",
"language": "php",
"file_size": 12852,
"cut_index": 921,
"middle_length": 229
} |
namespace Illuminate\Foundation\Testing\Concerns;
use ErrorException;
trait InteractsWithDeprecationHandling
{
/**
* The original deprecation handler.
*
* @var callable|null
*/
protected $originalDeprecationHandler;
/**
* Restore deprecation handling.
*
* @return $this... | function withoutDeprecationHandling()
{
if ($this->originalDeprecationHandler == null) {
$this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) {
if (in_array($level, | this->originalDeprecationHandler = null));
}
return $this;
}
/**
* Disable deprecation handling for the test.
*
* @return $this
*
* @throws \ErrorException
*/
protected | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php",
"language": "php",
"file_size": 1230,
"cut_index": 518,
"middle_length": 229
} |
aits\ReflectsClosures;
use Illuminate\Testing\Assert;
use Illuminate\Validation\ValidationException;
use Symfony\Component\Console\Application as ConsoleApplication;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
trait InteractsWithExceptionHandling
{
use ReflectsClosures;
/*... | $currentExceptionHandler instanceof ExceptionHandlerFake
? $currentExceptionHandler->setHandler($this->originalExceptionHandler)
: $this->app->instance(ExceptionHandler::class, $this->originalExceptionHandler);
}
| handling.
*
* @return $this
*/
protected function withExceptionHandling()
{
if ($this->originalExceptionHandler) {
$currentExceptionHandler = app(ExceptionHandler::class);
| {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php",
"language": "php",
"file_size": 7596,
"cut_index": 716,
"middle_length": 229
} |
s\Factory as Redis;
use Illuminate\Foundation\Application;
use Illuminate\Redis\RedisManager;
use Illuminate\Support\Env;
trait InteractsWithRedis
{
/**
* Indicate connection failed if redis is not available.
*
* @var bool
*/
private static $connectionFailedOnceWithDefaultsSkip = false;
... | }
if (static::$connectionFailedOnceWithDefaultsSkip) {
$this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__);
}
$app = $this->app ?? ne | void
*/
public function setUpRedis()
{
if (! extension_loaded('redis')) {
$this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__);
| {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php",
"language": "php",
"file_size": 4378,
"cut_index": 614,
"middle_length": 229
} |
namespace Illuminate\Foundation\Testing\Concerns;
trait InteractsWithSession
{
/**
* Set the session to the given array.
*
* @param array $data
* @return $this
*/
public function withSession(array $data)
{
$this->session($data);
return $this;
}
/**
... | ed function startSession()
{
if (! $this->app['session']->isStarted()) {
$this->app['session']->start();
}
return $this;
}
/**
* Flush all of the current session data.
*
* @return $this
| reach ($data as $key => $value) {
$this->app['session']->put($key, $value);
}
return $this;
}
/**
* Start the session for the application.
*
* @return $this
*/
protect | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php",
"language": "php",
"file_size": 1150,
"cut_index": 518,
"middle_length": 229
} |
RegisterProviders;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
use Illuminate\Foundation\Http\Middleware\PreventRequestForgery;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance;... | ;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Http\Client\Response;
use Illuminate\Http\Middleware\HandleCors;
use Illuminate\Http\Middleware\TrustHosts;
use Illuminate\Http\Middleware\TrustProxies;
use Illuminate\Http\Resources\Jso | ting\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\DatabaseTruncation;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker | {
"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithTestCaseLifecycle.php",
"language": "php",
"file_size": 9713,
"cut_index": 921,
"middle_length": 229
} |
e Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\RouteCollection;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'route:cache')]
class RouteCacheCommand extends Command
{
/**
* The... | te command instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
*/
public function __construct(Filesystem $files)
{
parent::__construct();
$this->files = $files;
}
/**
* Execute the console c | description = 'Create a route cache file for faster route registration';
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* Create a new rou | {
"filepath": "src/Illuminate/Foundation/Console/RouteCacheCommand.php",
"language": "php",
"file_size": 2772,
"cut_index": 563,
"middle_length": 229
} |
e Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(name: 'make:rule')]
class RuleMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'm... | cts\Filesystem\FileNotFoundException
*/
protected function buildClass($name)
{
return str_replace(
'{{ ruleType }}',
$this->option('implicit') ? 'ImplicitRule' : 'Rule',
parent::buildClass($name)
| ng generated.
*
* @var string
*/
protected $type = 'Rule';
/**
* Build the class with the given name.
*
* @param string $name
* @return string
*
* @throws \Illuminate\Contra | {
"filepath": "src/Illuminate/Foundation/Console/RuleMakeCommand.php",
"language": "php",
"file_size": 2052,
"cut_index": 563,
"middle_length": 229
} |
ymfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;
use function Illuminate\Support\php_binary;
use function Termwind\terminal;
#[AsCommand(name: 'serve')]
class ServeCommand extends Command
{
use InteractsWithTime;
/**
* The console command name.
*
* @var s... | protected $portOffset = 0;
/**
* The list of lines that are pending to be output.
*
* @var string
*/
protected $outputBuffer = '';
/**
* The list of requests being handled and their start time.
*
* @var a | evelopment server';
/**
* The number of PHP CLI server workers.
*
* @var int<2, max>|false
*/
protected $phpServerWorkers = 1;
/**
* The current port offset.
*
* @var int
*/
| {
"filepath": "src/Illuminate/Foundation/Console/ServeCommand.php",
"language": "php",
"file_size": 13560,
"cut_index": 921,
"middle_length": 229
} |
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'storage:unlink')]
class StorageUnlinkCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'sto... | continue;
}
$this->laravel->make('files')->delete($link);
$this->components->info("The [$link] link has been deleted.");
}
}
/**
* Get the symbolic links that are configured for th | /**
* Execute the console command.
*
* @return void
*/
public function handle()
{
foreach ($this->links() as $link => $target) {
if (! file_exists($link) || ! is_link($link)) {
| {
"filepath": "src/Illuminate/Foundation/Console/StorageUnlinkCommand.php",
"language": "php",
"file_size": 1234,
"cut_index": 518,
"middle_length": 229
} |
te\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use function Laravel\Prompts\select;
#[AsCommand(name: 'make:test')]
class TestMakeCommand exten... | or the generator.
*
* @return string
*/
protected function getStub()
{
$suffix = $this->option('unit') ? '.unit.stub' : '.stub';
return $this->usingPest()
? $this->resolveStubPath('/stubs/pest'.$suffix)
| * @var string
*/
protected $description = 'Create a new test class';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'Test';
/**
* Get the stub file f | {
"filepath": "src/Illuminate/Foundation/Console/TestMakeCommand.php",
"language": "php",
"file_size": 3972,
"cut_index": 614,
"middle_length": 229
} |
pace Illuminate\Foundation\Console;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Foundation\Events\MaintenanceModeDisabled;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'up')]
class UpCommand extends Command
{
/**
* The console command name.
*
* @var string
... | ts->info('Application is already up.');
return 0;
}
$this->laravel->maintenanceMode()->deactivate();
if (is_file(storage_path('framework/maintenance.php'))) {
unlink(storage_path('frame | de';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
try {
if (! $this->laravel->maintenanceMode()->active()) {
$this->componen | {
"filepath": "src/Illuminate/Foundation/Console/UpCommand.php",
"language": "php",
"file_size": 1472,
"cut_index": 524,
"middle_length": 229
} |
r;
use League\Flysystem\MountManager;
use League\Flysystem\UnixVisibility\PortableVisibilityConverter;
use League\Flysystem\Visibility;
use Symfony\Component\Console\Attribute\AsCommand;
use function Laravel\Prompts\search;
use function Laravel\Prompts\select;
#[AsCommand(name: 'vendor:publish')]
class VendorPublishC... | \Illuminate\Support\Carbon|null
*/
protected $publishedAt;
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'vendor:publish
{--existing : Publish and overwrite only the | *
* @var string|null
*/
protected $provider = null;
/**
* The tags to publish.
*
* @var array
*/
protected $tags = [];
/**
* The time the command started.
*
* @var | {
"filepath": "src/Illuminate/Foundation/Console/VendorPublishCommand.php",
"language": "php",
"file_size": 11059,
"cut_index": 921,
"middle_length": 229
} |
omponent\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Finder\Finder;
use Throwable;
use WeakMap;
class Kernel implements KernelContract
{
use In... | ispatcherInterface|null
*/
protected $symfonyDispatcher;
/**
* The Artisan application instance.
*
* @var \Illuminate\Console\Application|null
*/
protected $artisan;
/**
* The Artisan commands provided by the | r implementation.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/**
* The Symfony event dispatcher implementation.
*
* @var \Symfony\Contracts\EventDispatcher\EventD | {
"filepath": "src/Illuminate/Foundation/Console/Kernel.php",
"language": "php",
"file_size": 17635,
"cut_index": 1331,
"middle_length": 229
} |
te\Foundation\Console;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'lang:publish')]
class LangPublishCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
... | le command.
*
* @return void
*/
public function handle()
{
if (! is_dir($langPath = $this->laravel->basePath('lang/en'))) {
(new Filesystem)->makeDirectory($langPath, recursive: true);
}
$stubs = | xisting files}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Publish all language files that are available for customization';
/**
* Execute the conso | {
"filepath": "src/Illuminate/Foundation/Console/LangPublishCommand.php",
"language": "php",
"file_size": 1867,
"cut_index": 537,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.