prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
ollection; use Illuminate\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:mail')] clas...
ed $type = 'Mailable'; /** * Execute the console command. * * @return void */ public function handle() { if (parent::handle() === false && ! $this->option('force')) { return; } if ($this
* * The console command description. * * @var string */ protected $description = 'Create a new email class'; /** * The type of class being generated. * * @var string */ protect
{ "filepath": "src/Illuminate/Foundation/Console/MailMakeCommand.php", "language": "php", "file_size": 6332, "cut_index": 716, "middle_length": 229 }
use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Collection; use Illuminate\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 funct...
'Create a new notification class'; /** * The type of class being generated. * * @var string */ protected $type = 'Notification'; /** * Execute the console command. * * @return void */ public functi
/** * The console command name. * * @var string */ protected $name = 'make:notification'; /** * The console command description. * * @var string */ protected $description =
{ "filepath": "src/Illuminate/Foundation/Console/NotificationMakeCommand.php", "language": "php", "file_size": 4682, "cut_index": 614, "middle_length": 229 }
e Illuminate\Console\Command; use Illuminate\Support\Collection; use Illuminate\Support\ServiceProvider; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'optimize:clear')] class OptimizeClearCommand extends Command { /** * The console comma...
$exceptions = Collection::wrap(explode(',', $this->option('except') ?? '')) ->map(fn ($except) => trim($except)) ->filter() ->unique() ->flip(); $tasks = Collection::wrap($this->getOptimizeClearT
= 'Remove the cached bootstrap files'; /** * Execute the console command. * * @return void */ public function handle() { $this->components->info('Clearing cached bootstrap files.');
{ "filepath": "src/Illuminate/Foundation/Console/OptimizeClearCommand.php", "language": "php", "file_size": 2106, "cut_index": 563, "middle_length": 229 }
hp namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Foundation\PackageManifest; use Illuminate\Support\Collection; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'package:discover')] class PackageDiscoverCommand extends Command { /** * The console...
le(PackageManifest $manifest) { $this->components->info('Discovering packages'); $manifest->build(); (new Collection($manifest->manifest)) ->keys() ->each(fn ($description) => $this->components->task($d
ected $description = 'Rebuild the cached package manifest'; /** * Execute the console command. * * @param \Illuminate\Foundation\PackageManifest $manifest * @return void */ public function hand
{ "filepath": "src/Illuminate/Foundation/Console/PackageDiscoverCommand.php", "language": "php", "file_size": 1076, "cut_index": 515, "middle_length": 229 }
e Illuminate\Console\GeneratorCommand; use Illuminate\Support\ServiceProvider; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'make:provider')] class ProviderMakeCommand extends GeneratorCommand { /** * The console command name. * ...
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function handle() { $result = parent::handle(); if ($result === false) { return $result; } ServiceProvider::addProviderTo
vice provider class'; /** * The type of class being generated. * * @var string */ protected $type = 'Provider'; /** * Execute the console command. * * @return bool|null *
{ "filepath": "src/Illuminate/Foundation/Console/ProviderMakeCommand.php", "language": "php", "file_size": 2263, "cut_index": 563, "middle_length": 229 }
<?php namespace Illuminate\Foundation\Console; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Console\Kernel as KernelContract; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; class QueuedCommand implements ShouldQueue { use Dispatchable, Queueable; /** *...
elContract $kernel) { $kernel->call(...array_values($this->data)); } /** * Get the display name for the queued job. * * @return string */ public function displayName() { return array_values($this->da
function __construct($data) { $this->data = $data; } /** * Handle the job. * * @param \Illuminate\Contracts\Console\Kernel $kernel * @return void */ public function handle(Kern
{ "filepath": "src/Illuminate/Foundation/Console/QueuedCommand.php", "language": "php", "file_size": 1013, "cut_index": 512, "middle_length": 229 }
namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'route:clear')] class RouteClearCommand extends Command { /** * The console command name. * * @var string */ ...
s */ 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 route clear command instance. * * @param \Illuminate\Filesystem\Filesystem $file
{ "filepath": "src/Illuminate/Foundation/Console/RouteClearCommand.php", "language": "php", "file_size": 1146, "cut_index": 518, "middle_length": 229 }
n; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Terminal; #[AsCommand(name: 'route:list')] class RouteListCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'rout...
, 'Middleware', 'Path']; /** * The terminal width resolver callback. * * @var \Closure|null */ protected static $terminalWidthResolver; /** * The verb colors for the command. * * @var array */ prote
* * @var \Illuminate\Routing\Router */ protected $router; /** * The table headers for the command. * * @var string[] */ protected $headers = ['Domain', 'Method', 'URI', 'Name', 'Action'
{ "filepath": "src/Illuminate/Foundation/Console/RouteListCommand.php", "language": "php", "file_size": 17079, "cut_index": 921, "middle_length": 229 }
e Illuminate\Console\Command; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'storage:link')] class StorageLinkCommand extends Command { /** * The console command signature. * * @var string */ protected $signature = 'storage:link {--relative : Create th...
('relative'); foreach ($this->links() as $link => $target) { if (file_exists($link) && ! $this->isRemovableSymlink($link, $this->option('force'))) { $this->components->error("The [$link] link already exists.");
ected $description = 'Create the symbolic links configured for the application'; /** * Execute the console command. * * @return void */ public function handle() { $relative = $this->option
{ "filepath": "src/Illuminate/Foundation/Console/StorageLinkCommand.php", "language": "php", "file_size": 2106, "cut_index": 563, "middle_length": 229 }
bute\AsCommand; #[AsCommand(name: 'stub:publish')] class StubPublishCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'stub:publish {--existing : Publish and overwrite only the files that have already...
th('stubs'))) { (new Filesystem)->makeDirectory($stubsPath); } $stubs = [ __DIR__.'/stubs/cast.inbound.stub' => 'cast.inbound.stub', __DIR__.'/stubs/cast.stub' => 'cast.stub', __DIR__.'/stubs
'Publish all stubs that are available for customization'; /** * Execute the console command. * * @return void */ public function handle() { if (! is_dir($stubsPath = $this->laravel->basePa
{ "filepath": "src/Illuminate/Foundation/Console/StubPublishCommand.php", "language": "php", "file_size": 6023, "cut_index": 716, "middle_length": 229 }
te\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'view:clear')] class ViewClearCommand extends Command { /** * The console command name. * * @var string */ ...
iles */ public function __construct(Filesystem $files) { parent::__construct(); $this->files = $files; } /** * Execute the console command. * * @return void * * @throws \RuntimeException
* The filesystem instance. * * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * Create a new config clear command instance. * * @param \Illuminate\Filesystem\Filesystem $f
{ "filepath": "src/Illuminate/Foundation/Console/ViewClearCommand.php", "language": "php", "file_size": 1680, "cut_index": 537, "middle_length": 229 }
use Illuminate\Console\GeneratorCommand; use Illuminate\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\suggest; #[AsC...
rated. * * @var string */ protected $type = 'Listener'; /** * Build the class with the given name. * * @param string $name * @return string */ protected function buildClass($name) { $event
protected $name = 'make:listener'; /** * The console command description. * * @var string */ protected $description = 'Create a new event listener class'; /** * The type of class being gene
{ "filepath": "src/Illuminate/Foundation/Console/ListenerMakeCommand.php", "language": "php", "file_size": 4203, "cut_index": 614, "middle_length": 229 }
rgumentException; 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\suggest; #[AsCommand(name: 'make:observer')] class ObserverMakeCo...
* Build the class with the given name. * * @param string $name * @return string */ protected function buildClass($name) { $stub = parent::buildClass($name); $model = $this->option('model'); return $
on. * * @var string */ protected $description = 'Create a new observer class'; /** * The type of class being generated. * * @var string */ protected $type = 'Observer'; /**
{ "filepath": "src/Illuminate/Foundation/Console/ObserverMakeCommand.php", "language": "php", "file_size": 4519, "cut_index": 614, "middle_length": 229 }
ponent\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use function Laravel\Prompts\suggest; #[AsCommand(name: 'make:policy')] class PolicyMakeCommand extends GeneratorCommand { /** * The console command name. * * ...
ring */ protected function buildClass($name) { $stub = $this->replaceUserNamespace( parent::buildClass($name) ); $model = $this->option('model'); return $model ? $this->replaceModel($stub, $model)
ass'; /** * The type of class being generated. * * @var string */ protected $type = 'Policy'; /** * Build the class with the given name. * * @param string $name * @return st
{ "filepath": "src/Illuminate/Foundation/Console/PolicyMakeCommand.php", "language": "php", "file_size": 6115, "cut_index": 716, "middle_length": 229 }
te\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Support\Collection; use Illuminate\Support\ServiceProvider; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'reload')] class ReloadCommand extends Command { /** * The co...
llection::wrap(explode(',', $this->option('except') ?? '')) ->map(fn ($except) => trim($except)) ->filter() ->unique() ->flip(); $tasks = Collection::wrap($this->getReloadTasks()) ->rejec
ion = 'Reload running services'; /** * Execute the console command. * * @return void */ public function handle() { $this->components->info('Reloading services.'); $exceptions = Co
{ "filepath": "src/Illuminate/Foundation/Console/ReloadCommand.php", "language": "php", "file_size": 1861, "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:scope')] class ScopeMakeCommand extends GeneratorCommand { /** * The console command name. * * @var string ...
{ return $this->resolveStubPath('/stubs/scope.stub'); } /** * Resolve the fully-qualified path to the stub. * * @param string $stub * @return string */ protected function resolveStubPath($stub) {
* The type of class being generated. * * @var string */ protected $type = 'Scope'; /** * Get the stub file for the generator. * * @return string */ protected function getStub()
{ "filepath": "src/Illuminate/Foundation/Console/ScopeMakeCommand.php", "language": "php", "file_size": 1742, "cut_index": 537, "middle_length": 229 }
t\Collection; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\SplFileInfo; #[AsCommand(name: 'view:cache')] class ViewCacheCommand extends Command { /** * The name and signature of the co...
his->paths()->each(function ($path) { $prefix = $this->output->isVeryVerbose() ? '<fg=yellow;options=bold>DIR</> ' : ''; $this->components->task($prefix.$path, null, OutputInterface::VERBOSITY_VERBOSE); $this->compileV
ription = "Compile all of the application's Blade templates"; /** * Execute the console command. * * @return void */ public function handle() { $this->callSilent('view:clear'); $t
{ "filepath": "src/Illuminate/Foundation/Console/ViewCacheCommand.php", "language": "php", "file_size": 3134, "cut_index": 614, "middle_length": 229 }
e; use function Laravel\Prompts\confirm; use function Laravel\Prompts\multiselect; #[AsCommand(name: 'make:model')] class ModelMakeCommand extends GeneratorCommand { use CreatesMatchingTest; /** * The console command name. * * @var string */ protected $name = 'make:model'; /** ...
ption('force')) { if (! $this->alreadyExists($this->getNameInput())) { return false; } if (! confirm('Do you want to generate additional components for the model?')) { return false;
* * @var string */ protected $type = 'Model'; /** * Execute the console command. * * @return void */ public function handle() { if (parent::handle() === false && ! $this->o
{ "filepath": "src/Illuminate/Foundation/Console/ModelMakeCommand.php", "language": "php", "file_size": 10064, "cut_index": 921, "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:trait')] class TraitMakeCommand extends GeneratorCommand { /** * The console command name. * * @var string ...
return $this->resolveStubPath('/stubs/trait.stub'); } /** * Resolve the fully-qualified path to the stub. * * @param string $stub * @return string */ protected function resolveStubPath($stub) { retu
e type of class being generated. * * @var string */ protected $type = 'Trait'; /** * Get the stub file for the generator. * * @return string */ protected function getStub() {
{ "filepath": "src/Illuminate/Foundation/Console/TraitMakeCommand.php", "language": "php", "file_size": 1852, "cut_index": 537, "middle_length": 229 }
e Illuminate\Console\Command; use Illuminate\Support\Collection; use Illuminate\Support\ServiceProvider; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'optimize')] class OptimizeCommand extends Command { /** * The console command name. ...
work bootstrap, configuration, and metadata.'); $exceptions = Collection::wrap(explode(',', $this->option('except') ?? '')) ->map(fn ($except) => trim($except)) ->filter() ->unique() ->flip();
rk bootstrap, configuration, and metadata to increase performance'; /** * Execute the console command. * * @return void */ public function handle() { $this->components->info('Caching frame
{ "filepath": "src/Illuminate/Foundation/Console/OptimizeCommand.php", "language": "php", "file_size": 2085, "cut_index": 563, "middle_length": 229 }
e\ConfirmableTrait; use Illuminate\Console\Prohibitable; use Illuminate\Encryption\Encrypter; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'key:generate')] class KeyGenerateCommand extends Command { use ConfirmableTrait, Prohibitable; /** * The name and signature of the console co...
* * @return void */ public function handle() { if ($this->isProhibited()) { return; } $key = $this->generateRandomKey(); if ($this->option('show')) { return $this->line('<comme
the operation to run when in production}'; /** * The console command description. * * @var string */ protected $description = 'Set the application key'; /** * Execute the console command.
{ "filepath": "src/Illuminate/Foundation/Console/KeyGenerateCommand.php", "language": "php", "file_size": 3571, "cut_index": 614, "middle_length": 229 }
te\Foundation\Exceptions; use Illuminate\Support\Traits\ReflectsClosures; use Throwable; class ReportableHandler { use ReflectsClosures; /** * The underlying callback. * * @var callable */ protected $callback; /** * Indicates if reporting should stop after invoking this hand...
$e) { $result = call_user_func($this->callback, $e); if ($result === false) { return false; } return ! $this->shouldStop; } /** * Determine if the callback handles the given exception. *
unction __construct(callable $callback) { $this->callback = $callback; } /** * Invoke the handler. * * @param \Throwable $e * @return bool */ public function __invoke(Throwable
{ "filepath": "src/Illuminate/Foundation/Exceptions/ReportableHandler.php", "language": "php", "file_size": 1547, "cut_index": 537, "middle_length": 229 }
pace Illuminate\Foundation\Events; trait Dispatchable { /** * Dispatch the event with the given arguments. * * @param mixed ...$arguments * @return mixed */ public static function dispatch(...$arguments) { return event(new static(...$arguments)); } /** * Dis...
est passes. * * @param bool $boolean * @param mixed ...$arguments * @return mixed */ public static function dispatchUnless($boolean, ...$arguments) { if (! $boolean) { return event(new static(...$arg
function dispatchIf($boolean, ...$arguments) { if ($boolean) { return event(new static(...$arguments)); } } /** * Dispatch the event with the given arguments unless the given truth t
{ "filepath": "src/Illuminate/Foundation/Events/Dispatchable.php", "language": "php", "file_size": 1324, "cut_index": 524, "middle_length": 229 }
PHPUnit\Framework\Assert as PHPUnit; class Factory { use Macroable { __call as macroCall; } /** * Indicates if the process factory has faked process handlers. * * @var bool */ protected $recording = false; /** * All of the recorded processes. * * @var ar...
aram array|string $output * @param array|string $errorOutput * @param int $exitCode * @return \Illuminate\Process\FakeProcessResult */ public function result(array|string $output = '', array|string $errorOutput = '', int $exit
at an exception should be thrown if any process is not faked. * * @var bool */ protected $preventStrayProcesses = false; /** * Create a new fake process response for testing purposes. * * @p
{ "filepath": "src/Illuminate/Process/Factory.php", "language": "php", "file_size": 8610, "cut_index": 716, "middle_length": 229 }
ing faked. * * @var string */ protected $command; /** * The underlying process description. * * @var \Illuminate\Process\FakeProcessDescription */ protected $process; /** * The signals that have been received. * * @var array */ protected $rece...
* * The current error output's index. * * @var int */ protected $nextErrorOutputIndex = 0; /** * Create a new invoked process instance. * * @param string $command * @param \Illuminate\Process\FakeProcessD
* The general output handler callback. * * @var callable|null */ protected $outputHandler; /** * The current output's index. * * @var int */ protected $nextOutputIndex = 0; /*
{ "filepath": "src/Illuminate/Process/FakeInvokedProcess.php", "language": "php", "file_size": 8310, "cut_index": 716, "middle_length": 229 }
*/ public $processId = 1000; /** * All of the process' output in the order it was described. * * @var array */ public $output = []; /** * The process' exit code. * * @var int */ public $exitCode = 0; /** * The number of times the process shoul...
param array|string $output * @return $this */ public function output(array|string $output) { if (is_array($output)) { (new Collection($output))->each(fn ($line) => $this->output($line)); return $this;
am int $processId * @return $this */ public function id(int $processId) { $this->processId = $processId; return $this; } /** * Describe a line of standard output. * * @
{ "filepath": "src/Illuminate/Process/FakeProcessDescription.php", "language": "php", "file_size": 5207, "cut_index": 716, "middle_length": 229 }
ontract; use Illuminate\Process\Exceptions\ProcessFailedException; use Illuminate\Support\Collection; class FakeProcessResult implements ProcessResultContract { /** * The command string. * * @var string */ protected $command; /** * The process exit code. * * @var int ...
ing $errorOutput */ public function __construct(string $command = '', int $exitCode = 0, array|string $output = '', array|string $errorOutput = '') { $this->command = $command; $this->exitCode = $exitCode; $this->outpu
ing */ protected $errorOutput = ''; /** * Create a new process result instance. * * @param string $command * @param int $exitCode * @param array|string $output * @param array|str
{ "filepath": "src/Illuminate/Process/FakeProcessResult.php", "language": "php", "file_size": 4571, "cut_index": 614, "middle_length": 229 }
ontract; use OutOfBoundsException; class FakeProcessSequence { /** * The fake process results and descriptions. * * @var array */ protected $processes = []; /** * Indicates that invoking this sequence when it is empty should throw an exception. * * @var bool */ ...
{ $this->processes = $processes; } /** * Push a new process result or description onto the sequence. * * @param \Illuminate\Contracts\Process\ProcessResult|\Illuminate\Process\FakeProcessDescription|array|string $proce
cess\FakeProcessDescription */ protected $emptyProcess; /** * Create a new fake process sequence instance. * * @param array $processes */ public function __construct(array $processes = [])
{ "filepath": "src/Illuminate/Process/FakeProcessSequence.php", "language": "php", "file_size": 3457, "cut_index": 614, "middle_length": 229 }
sContract; use Illuminate\Process\Exceptions\ProcessTimedOutException; use Symfony\Component\Process\Exception\ProcessTimedOutException as SymfonyTimeoutException; use Symfony\Component\Process\Process; class InvokedProcess implements InvokedProcessContract { /** * The underlying process instance. * ...
unction id() { return $this->process->getPid(); } /** * Get the command line for the process. * * @return string */ public function command() { return $this->process->getCommandLine(); } /**
cess */ public function __construct(Process $process) { $this->process = $process; } /** * Get the process ID if the process is still running. * * @return int|null */ public f
{ "filepath": "src/Illuminate/Process/InvokedProcess.php", "language": "php", "file_size": 4114, "cut_index": 614, "middle_length": 229 }
te\Process; use Countable; use Illuminate\Support\Collection; class InvokedProcessPool implements Countable { /** * The array of invoked processes. * * @var array */ protected $invokedProcesses; /** * Create a new invoked process pool. * * @param array $invokedProcess...
gnal($signal); } /** * Stop all processes that are still running. * * @param float $timeout * @param int|null $signal * @return \Illuminate\Support\Collection */ public function stop(float $timeout = 10, ?int
e pool, returning the processes that were signalled. * * @param int $signal * @return \Illuminate\Support\Collection */ public function signal(int $signal) { return $this->running()->each->si
{ "filepath": "src/Illuminate/Process/InvokedProcessPool.php", "language": "php", "file_size": 1823, "cut_index": 537, "middle_length": 229 }
s\Process; class PendingProcess { use Conditionable; /** * The process factory instance. * * @var \Illuminate\Process\Factory */ protected $factory; /** * The command to invoke the process. * * @var array<array-key, string>|string|null */ public $command; ...
ronment variables for the process. * * @var array */ public $environment = []; /** * The standard input data that should be piped into the command. * * @var string|int|float|bool|resource|\Traversable|null */
var int|null */ public $timeout = 60; /** * The maximum number of seconds the process may go without returning output. * * @var int */ public $idleTimeout; /** * The additional envi
{ "filepath": "src/Illuminate/Process/PendingProcess.php", "language": "php", "file_size": 12086, "cut_index": 921, "middle_length": 229 }
e\Support\Collection; use InvalidArgumentException; /** * @mixin \Illuminate\Process\Factory * @mixin \Illuminate\Process\PendingProcess */ class Pipe { /** * The process factory instance. * * @var \Illuminate\Process\Factory */ protected $factory; /** * The callback that resol...
ble $callback) { $this->factory = $factory; $this->callback = $callback; } /** * Add a process to the pipe with a key. * * @param string $key * @return \Illuminate\Process\PendingProcess */ public
rocesses = []; /** * Create a new series of piped processes. * * @param \Illuminate\Process\Factory $factory * @param callable $callback */ public function __construct(Factory $factory, calla
{ "filepath": "src/Illuminate/Process/Pipe.php", "language": "php", "file_size": 2858, "cut_index": 563, "middle_length": 229 }
/** * @mixin \Illuminate\Process\Factory * @mixin \Illuminate\Process\PendingProcess */ class Pool { /** * The process factory instance. * * @var \Illuminate\Process\Factory */ protected $factory; /** * The callback that resolves the pending processes. * * @var calla...
$this->callback = $callback; } /** * Add a process to the pool with a key. * * @param string $key * @return \Illuminate\Process\PendingProcess */ public function as(string $key) { return tap($this->factor
pool. * * @param \Illuminate\Process\Factory $factory * @param callable $callback */ public function __construct(Factory $factory, callable $callback) { $this->factory = $factory;
{ "filepath": "src/Illuminate/Process/Pool.php", "language": "php", "file_size": 3112, "cut_index": 614, "middle_length": 229 }
te\Process; use ArrayAccess; use Illuminate\Support\Collection; class ProcessPoolResults implements ArrayAccess { /** * The results of the processes. * * @var array */ protected $results = []; /** * Create a new process pool result set. * * @param array $results ...
l */ public function failed() { return ! $this->successful(); } /** * Get the results as a collection. * * @return \Illuminate\Support\Collection */ public function collect() { return new Co
return bool */ public function successful() { return $this->collect()->every(fn ($p) => $p->successful()); } /** * Determine if any of the processes in the pool failed. * * @return boo
{ "filepath": "src/Illuminate/Process/ProcessPoolResults.php", "language": "php", "file_size": 1967, "cut_index": 537, "middle_length": 229 }
ontract; use Illuminate\Process\Exceptions\ProcessFailedException; use Symfony\Component\Process\Process; class ProcessResult implements ProcessResultContract { /** * The underlying process instance. * * @var \Symfony\Component\Process\Process */ protected $process; /** * Create a...
if the process was successful. * * @return bool */ public function successful() { return $this->process->isSuccessful(); } /** * Determine if the process failed. * * @return bool */ public fu
ss; } /** * Get the original command executed by the process. * * @return string */ public function command() { return $this->process->getCommandLine(); } /** * Determine
{ "filepath": "src/Illuminate/Process/ProcessResult.php", "language": "php", "file_size": 3148, "cut_index": 614, "middle_length": 229 }
?php namespace Illuminate\Process\Exceptions; use Illuminate\Contracts\Process\ProcessResult; use RuntimeException; class ProcessFailedException extends RuntimeException { /** * The process result instance. * * @var \Illuminate\Contracts\Process\ProcessResult */ public $result; /** ...
$error .= sprintf("\n\nOutput:\n================\n%s", $result->output()); } if (! empty($result->errorOutput())) { $error .= sprintf("\n\nError Output:\n================\n%s", $result->errorOutput()); } parent
this->result = $result; $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s", $result->command(), $result->exitCode(), ); if (! empty($result->output())) {
{ "filepath": "src/Illuminate/Process/Exceptions/ProcessFailedException.php", "language": "php", "file_size": 1055, "cut_index": 513, "middle_length": 229 }
\Exceptions; use Illuminate\Contracts\Process\ProcessResult; use Symfony\Component\Process\Exception\ProcessTimedOutException as SymfonyTimeoutException; use Symfony\Component\Process\Exception\RuntimeException; class ProcessTimedOutException extends RuntimeException { /** * The process result instance. ...
\Illuminate\Contracts\Process\ProcessResult $result */ public function __construct(SymfonyTimeoutException $original, ProcessResult $result) { $this->result = $result; parent::__construct($original->getMessage(), $original-
on\ProcessTimedOutException $original * @param
{ "filepath": "src/Illuminate/Process/Exceptions/ProcessTimedOutException.php", "language": "php", "file_size": 887, "cut_index": 547, "middle_length": 52 }
roable; use Symfony\Component\HttpFoundation\Cookie; class CookieJar implements JarContract { use InteractsWithTime, Macroable; /** * The default path (if specified). * * @var string */ protected $path = '/'; /** * The default domain (if specified). * * @var string|...
tected $queued = []; /** * Create a new cookie instance. * * @param string $name * @param string $value * @param int $minutes * @param string|null $path * @param string|null $domain * @param bool|null
ite option (defaults to lax). * * @var string */ protected $sameSite = 'lax'; /** * All of the cookies queued for sending. * * @var \Symfony\Component\HttpFoundation\Cookie[] */ pro
{ "filepath": "src/Illuminate/Cookie/CookieJar.php", "language": "php", "file_size": 6380, "cut_index": 716, "middle_length": 229 }
namespace Illuminate\Cookie; class CookieValuePrefix { /** * Create a new cookie value prefix for the given cookie name. * * @param string $cookieName * @param string $key * @return string */ public static function create($cookieName, $key) { return hash_hmac('sha...
* @param string $cookieName * @param string $cookieValue * @param array $keys * @return string|null */ public static function validate($cookieName, $cookieValue, array $keys) { foreach ($keys as $key) {
e($cookieValue) { return substr($cookieValue, 41); } /** * Validate a cookie value contains a valid prefix. If it does, return the cookie value with the prefix removed. Otherwise, return null. *
{ "filepath": "src/Illuminate/Cookie/CookieValuePrefix.php", "language": "php", "file_size": 1211, "cut_index": 518, "middle_length": 229 }
inate\Contracts\Cookie\QueueingFactory as CookieJar; class AddQueuedCookiesToResponse { /** * The cookie jar instance. * * @var \Illuminate\Contracts\Cookie\QueueingFactory */ protected $cookies; /** * Create a new CookieQueue instance. * * @param \Illuminate\Contracts\...
* @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { $response = $next($request); foreach ($this->cookies->getQueuedCookies() as $cookie) { $response->headers->setCo
* @param \Illuminate\Http\Request $request
{ "filepath": "src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php", "language": "php", "file_size": 950, "cut_index": 582, "middle_length": 52 }
\CookieValuePrefix; use Illuminate\Support\Arr; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class EncryptCookies { /** * The encrypter instance. * * @var \Illuminate\Contracts\Encryption\Encrypter */ ...
ed static $serialize = false; /** * Create a new CookieGuard instance. * * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter */ public function __construct(EncrypterContract $encrypter) { $this->encrypt
obally ignored cookies that should not be encrypted. * * @var array */ protected static $neverEncrypt = []; /** * Indicates if cookies should be serialized. * * @var bool */ protect
{ "filepath": "src/Illuminate/Cookie/Middleware/EncryptCookies.php", "language": "php", "file_size": 6622, "cut_index": 716, "middle_length": 229 }
* This is a PHP 7.4 compatible implementation of is_callable. * * @param mixed $var * @param bool $syntaxOnly * @return bool */ public static function isCallable($var, $syntaxOnly = false) { if (! is_array($var)) { return is_callable($var, $syntaxOnly); ...
urn false; } if (method_exists($class, $method)) { return (new ReflectionMethod($class, $method))->isPublic(); } if (is_object($var[0]) && method_exists($class, '__call')) { return (new ReflectionMe
[0])) && is_string($var[1])) { return true; } $class = is_object($var[0]) ? get_class($var[0]) : $var[0]; $method = $var[1]; if (! class_exists($class)) { ret
{ "filepath": "src/Illuminate/Reflection/Reflector.php", "language": "php", "file_size": 6305, "cut_index": 716, "middle_length": 229 }
es; if (! function_exists('lazy')) { /** * Create a lazy instance. * * @template TValue of object * * @param class-string<TValue>|(\Closure(TValue): mixed) $class * @param (\Closure(TValue): mixed)|int $callback * @param int $options * @param array<string, mixed> $ea...
$options] = is_string($class) ? [$class, $callback, $options] : [$closureReflector->typeFromParameter($class), $class, $callback ?: $options]; $reflectionClass = new ReflectionClass($class); $instance = $reflection
use ReflectsClosures; public function typeFromParameter($callback) { return $this->firstClosureParameterType($callback); } }; [$class, $callback,
{ "filepath": "src/Illuminate/Reflection/helpers.php", "language": "php", "file_size": 2869, "cut_index": 563, "middle_length": 229 }
inate\Support\Reflector; use ReflectionFunction; use ReflectionIntersectionType; use ReflectionUnionType; use RuntimeException; trait ReflectsClosures { /** * Get the class name of the first parameter of the given Closure. * * @param \Closure $closure * @return string * * @throws \R...
given Closure is missing a type hint.'); } return $types[0]; } /** * Get the class names of the first parameter of the given Closure, including union types. * * @param \Closure $closure * @return array *
$closure)); if (! $types) { throw new RuntimeException('The given Closure has no parameters.'); } if ($types[0] === null) { throw new RuntimeException('The first parameter of the
{ "filepath": "src/Illuminate/Reflection/Traits/ReflectsClosures.php", "language": "php", "file_size": 3714, "cut_index": 614, "middle_length": 229 }
use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Pipeline\Hub as HubContract; class Hub implements HubContract { /** * The container implementation. * * @var \Illuminate\Contracts\Container\Container|null */ protected $container; /** * All of the available p...
eturn void */ public function defaults(Closure $callback) { $this->pipeline('default', $callback); } /** * Define a new named pipeline. * * @param string $name * @param \Closure $callback * @return
ainer */ public function __construct(?Container $container = null) { $this->container = $container; } /** * Define the default named pipeline. * * @param \Closure $callback * @r
{ "filepath": "src/Illuminate/Pipeline/Hub.php", "language": "php", "file_size": 2089, "cut_index": 563, "middle_length": 229 }
e; use Illuminate\Support\Traits\Macroable; use RuntimeException; use Throwable; class Pipeline implements PipelineContract { use Conditionable; use Macroable; /** * The container implementation. * * @var \Illuminate\Contracts\Container\Container|null */ protected $container; ...
the outcome. * * @var \Closure|null */ protected $finally; /** * Indicates whether to wrap the pipeline in a database transaction. * * @var string|null|\UnitEnum|false */ protected $withinTransaction = false
protected $pipes = []; /** * The method to call on each pipe. * * @var string */ protected $method = 'handle'; /** * The final callback to be executed after the pipeline ends regardless of
{ "filepath": "src/Illuminate/Pipeline/Pipeline.php", "language": "php", "file_size": 8308, "cut_index": 716, "middle_length": 229 }
espace Illuminate\Pipeline; use Illuminate\Contracts\Pipeline\Hub as PipelineHubContract; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Support\ServiceProvider; class PipelineServiceProvider extends ServiceProvider implements DeferrableProvider { /** * Register the service provider. ...
ine', fn ($app) => new Pipeline($app)); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ PipelineHubContract::class, 'pipeline
p->bind('pipel
{ "filepath": "src/Illuminate/Pipeline/PipelineServiceProvider.php", "language": "php", "file_size": 814, "cut_index": 522, "middle_length": 14 }
e\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; class CallQueuedListener implements ShouldQueue { use InteractsWithQueue, Queueable; /** * The listener class name. * * @var class-string */ public $class; /** * The listener method. * * @var st...
seconds to wait before retrying a job that encountered an uncaught exception. * * @var int */ public $backoff; /** * The timestamp indicating when the job should timeout. * * @var int */ public $retryUntil;
tempted. * * @var int */ public $tries; /** * The maximum number of exceptions allowed, regardless of attempts. * * @var int */ public $maxExceptions; /** * The number of
{ "filepath": "src/Illuminate/Events/CallQueuedListener.php", "language": "php", "file_size": 5608, "cut_index": 716, "middle_length": 229 }
use Illuminate\Queue\Attributes\Backoff; use Illuminate\Queue\Attributes\Connection; use Illuminate\Queue\Attributes\Delay; use Illuminate\Queue\Attributes\DeleteWhenMissingModels; use Illuminate\Queue\Attributes\FailOnTimeout; use Illuminate\Queue\Attributes\MaxExceptions; use Illuminate\Queue\Attributes\Queue as Queu...
res; use ReflectionClass; use function Illuminate\Support\enum_value; class Dispatcher implements DispatcherContract { use Macroable, ReadsClassAttributes, ReflectsClosures, ResolvesQueueRoutes; /** * The IoC container instance. *
tion; use Illuminate\Support\Queue\Concerns\ResolvesQueueRoutes; use Illuminate\Support\Str; use Illuminate\Support\Traits\Macroable; use Illuminate\Support\Traits\ReadsClassAttributes; use Illuminate\Support\Traits\ReflectsClosu
{ "filepath": "src/Illuminate/Events/Dispatcher.php", "language": "php", "file_size": 27570, "cut_index": 1331, "middle_length": 229 }
nate\Support\Collection; class InvokeQueuedClosure { /** * Handle the event. * * @param \Laravel\SerializableClosure\SerializableClosure $closure * @param array $arguments * @return void */ public function handle($closure, array $arguments) { call_user_func($closur...
\Throwable $exception * @return void */ public function failed($closure, array $arguments, array $catchCallbacks, $exception) { $arguments[] = $exception; (new Collection($catchCallbacks))->each->__invoke(...$arguments);
* @param array $catchCallbacks * @param
{ "filepath": "src/Illuminate/Events/InvokeQueuedClosure.php", "language": "php", "file_size": 876, "cut_index": 559, "middle_length": 52 }
use Illuminate\Support\Traits\ForwardsCalls; class NullDispatcher implements DispatcherContract { use ForwardsCalls; /** * The underlying event dispatcher instance. * * @var \Illuminate\Contracts\Events\Dispatcher */ protected $dispatcher; /** * Create a new event dispatcher...
atch($event, $payload = [], $halt = false) { // } /** * Don't register an event and payload to be fired later. * * @param string $event * @param array $payload * @return void */ public function pus
this->dispatcher = $dispatcher; } /** * Don't fire an event. * * @param string|object $event * @param mixed $payload * @param bool $halt * @return void */ public function disp
{ "filepath": "src/Illuminate/Events/NullDispatcher.php", "language": "php", "file_size": 3097, "cut_index": 614, "middle_length": 229 }
lizableClosure\SerializableClosure; use function Illuminate\Support\enum_value; class QueuedClosure { /** * The underlying Closure. * * @var \Closure */ public $closure; /** * The name of the connection the job should be sent to. * * @var string|null */ public ...
osure|null */ public $deduplicator; /** * The number of seconds before the job should be made available. * * @var \DateTimeInterface|\DateInterval|int|null */ public $delay; /** * All of the "catch" callbacks
o. * * @var string|null */ public $messageGroup; /** * The job deduplicator callback the job should use to generate the deduplication ID. * * @var \Laravel\SerializableClosure\SerializableCl
{ "filepath": "src/Illuminate/Events/QueuedClosure.php", "language": "php", "file_size": 4072, "cut_index": 614, "middle_length": 229 }
te\Notifications; use Illuminate\Contracts\Notifications\Dispatcher; use InvalidArgumentException; class AnonymousNotifiable { /** * All of the notification routing information. * * @var array */ public $routes = []; /** * Add routing information to the target. * * @par...
* Send the given notification. * * @param mixed $notification * @return void */ public function notify($notification) { app(Dispatcher::class)->send($this, $notification); } /** * Send the given noti
annel === 'database') { throw new InvalidArgumentException('The database channel does not support on-demand notifications.'); } $this->routes[$channel] = $route; return $this; } /**
{ "filepath": "src/Illuminate/Notifications/AnonymousNotifiable.php", "language": "php", "file_size": 1643, "cut_index": 537, "middle_length": 229 }
nate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Notifications\Dispatcher as DispatcherContract; use Illuminate\Contracts\Notifications\Factory as FactoryContract; use Illuminate\Support\Manager; use Illuminate\Support\Queue\Concerns\ResolvesQueueRoutes; use Illuminate\Support\Traits\Macroable; use InvalidArg...
ed $defaultChannel = 'mail'; /** * The locale used when sending notifications. * * @var string|null */ protected $locale; /** * Send the given notification to the given notifiable entities. * * @param \Illu
instance. * * @var \Illuminate\Notifications\NotificationSender|null */ protected $notificationSender; /** * The default channel used to deliver messages. * * @var string */ protect
{ "filepath": "src/Illuminate/Notifications/ChannelManager.php", "language": "php", "file_size": 4652, "cut_index": 614, "middle_length": 229 }
enderer; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\Events\QueryExecuted; use Illuminate\Queue\Events\JobProcessed; use Illuminate\Queue\Events\JobProcessing; use Laravel\Octane\Events\RequestReceived; use Laravel\Octane\Events\RequestTerminated; use Laravel\Octane\Events\TaskReceived; use Lar...
*/ public function registerListeners(Dispatcher $events) { $events->listen(QueryExecuted::class, $this->onQueryExecuted(...)); $events->listen([JobProcessing::class, JobProcessed::class], function () { $this->queries =
dings: array}> */ protected $queries = []; /** * Register the appropriate listeners on the given event dispatcher. * * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void
{ "filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Listener.php", "language": "php", "file_size": 2420, "cut_index": 563, "middle_length": 229 }
e Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper; use Illuminate\Http\Request; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Throwable; class Renderer { /** * The path to the renderer's distribution files. * * @var string */ protected const DIST = __...
nent\ErrorHandler\ErrorRenderer\HtmlErrorRenderer */ protected $htmlErrorRenderer; /** * The Blade mapper instance. * * @var \Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper */ protected $bladeMapper;
* * The exception listener instance. * * @var \Illuminate\Foundation\Exceptions\Renderer\Listener */ protected $listener; /** * The HTML error renderer instance. * * @var \Symfony\Compo
{ "filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php", "language": "php", "file_size": 3592, "cut_index": 614, "middle_length": 229 }
yle> /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent}code{font-family:monospace,monospace;font-size:1em}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFo...
ty:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.border-gray-200{--border-opacity:1;border-color:#edf2f7;border-color:
olid #e2e8f0}a{color:inherit;text-decoration:inherit}code{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.bg-white{--bg-opaci
{ "filepath": "src/Illuminate/Foundation/Exceptions/views/minimal.blade.php", "language": "php", "file_size": 6613, "cut_index": 716, "middle_length": 229 }
Illuminate\Foundation\Exceptions\Whoops; use Illuminate\Contracts\Foundation\ExceptionRenderer; use Whoops\Run as Whoops; use function tap; class WhoopsExceptionRenderer implements ExceptionRenderer { /** * Renders the given exception as HTML. * * @param \Throwable $throwable * @return stri...
false); })->handleException($throwable); } /** * Get the Whoops handler for the application. * * @return \Whoops\Handler\Handler */ protected function whoopsHandler() { return (new WhoopsHandler)->forDeb
iteToOutput(false); $whoops->allowQuit(
{ "filepath": "src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php", "language": "php", "file_size": 851, "cut_index": 529, "middle_length": 52 }
hoops; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Whoops\Handler\PrettyPageHandler; class WhoopsHandler { /** * Create a new Whoops handler for debug mode. * * @return \Whoops\Handler\PrettyPageHandler */ public function forDebug() { return tap(new Pr...
ected function registerApplicationPaths($handler) { $handler->setApplicationPaths( array_flip($this->directoriesExceptVendor()) ); return $this; } /** * Get the application paths except for the "vendor
->registerEditor($handler); }); } /** * Register the application paths with the handler. * * @param \Whoops\Handler\PrettyPageHandler $handler * @return $this */ prot
{ "filepath": "src/Illuminate/Foundation/Exceptions/Whoops/WhoopsHandler.php", "language": "php", "file_size": 2099, "cut_index": 563, "middle_length": 229 }
pace Illuminate\Foundation\Auth\Access; use Illuminate\Contracts\Auth\Access\Gate; trait Authorizable { /** * Determine if the entity has the given abilities. * * @param iterable|\UnitEnum|string $abilities * @param mixed $arguments * @return bool */ public function can($abil...
ny($abilities, $arguments); } /** * Determine if the entity does not have the given abilities. * * @param iterable|\UnitEnum|string $abilities * @param mixed $arguments * @return bool */ public function cant($
* * @param iterable|\UnitEnum|string $abilities * @param mixed $arguments * @return bool */ public function canAny($abilities, $arguments = []) { return app(Gate::class)->forUser($this)->a
{ "filepath": "src/Illuminate/Foundation/Auth/Access/Authorizable.php", "language": "php", "file_size": 1420, "cut_index": 524, "middle_length": 229 }
luminate\Support\Str; use function Illuminate\Support\enum_value; trait AuthorizesRequests { /** * Authorize a given action for the current user. * * @param mixed $ability * @param mixed $arguments * @return \Illuminate\Auth\Access\Response * * @throws \Illuminate\Auth\Acces...
* @param mixed $arguments * @return \Illuminate\Auth\Access\Response * * @throws \Illuminate\Auth\Access\AuthorizationException */ public function authorizeForUser($user, $ability, $arguments = []) { [$ability, $arg
return app(Gate::class)->authorize($ability, $arguments); } /** * Authorize a given action for a user. * * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user * @param mixed $ability
{ "filepath": "src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php", "language": "php", "file_size": 3859, "cut_index": 614, "middle_length": 229 }
se Symfony\Component\VarDumper\Caster\ReflectionCaster; use Symfony\Component\VarDumper\Cloner\Data; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\HtmlDumper as BaseHtmlDumper; use Symfony\Component\VarDumper\VarDumper; class HtmlDumper extends BaseHtmlDumper { use Resolv...
@var string */ protected $basePath; /** * The compiled view path of the application. * * @var string */ protected $compiledViewPath; /** * If the dumper is currently dumping. * * @var bool */
* * Where the source should be placed on "non expanded" kind of dumps. * * @var string */ const NON_EXPANDED_SEPARATOR = "\n</pre><script>"; /** * The base path of the application. * *
{ "filepath": "src/Illuminate/Foundation/Http/HtmlDumper.php", "language": "php", "file_size": 3643, "cut_index": 614, "middle_length": 229 }
* * @var \Illuminate\Routing\Router */ protected $router; /** * The bootstrap classes for the application. * * @var string[] */ protected $bootstrappers = [ \Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class, \Illuminate\Foundation\Bootstrap\L...
ddleware = []; /** * The application's route middleware groups. * * @var array<string, array<int, class-string|string>> */ protected $middlewareGroups = []; /** * The application's route middleware. * * @var
trap\RegisterProviders::class, \Illuminate\Foundation\Bootstrap\BootProviders::class, ]; /** * The application's middleware stack. * * @var array<int, class-string|string> */ protected $mi
{ "filepath": "src/Illuminate/Foundation/Http/Kernel.php", "language": "php", "file_size": 18679, "cut_index": 1331, "middle_length": 229 }
pace Illuminate\Foundation\Http\Middleware; use Closure; class ConvertEmptyStringsToNull extends TransformsRequest { /** * All of the registered skip callbacks. * * @var array */ protected static $skipCallbacks = []; /** * Handle an incoming request. * * @param \Illumi...
am string $key * @param mixed $value * @return mixed */ protected function transform($key, $value) { return $value === '' ? null : $value; } /** * Register a callback that instructs the middleware to be skip
llback) { if ($callback($request)) { return $next($request); } } return parent::handle($request, $next); } /** * Transform the given value. * * @par
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php", "language": "php", "file_size": 1376, "cut_index": 524, "middle_length": 229 }
on\Application; use Illuminate\Contracts\Support\Responsable; use Illuminate\Cookie\CookieValuePrefix; use Illuminate\Cookie\Middleware\EncryptCookies; use Illuminate\Foundation\Http\Middleware\Concerns\ExcludesPaths; use Illuminate\Http\Exceptions\OriginMismatchException; use Illuminate\Session\TokenMismatchException;...
ryption\Encrypter */ protected $encrypter; /** * The URIs that should be excluded. * * @var array<int, string> */ protected $except = []; /** * The globally ignored URIs that should be excluded from CSRF veri
ime; /** * The application instance. * * @var \Illuminate\Contracts\Foundation\Application */ protected $app; /** * The encrypter implementation. * * @var \Illuminate\Contracts\Enc
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/PreventRequestForgery.php", "language": "php", "file_size": 8325, "cut_index": 716, "middle_length": 229 }
are; use Closure; use Symfony\Component\HttpFoundation\ParameterBag; class TransformsRequest { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { ...
request->query) { $this->cleanParameterBag($request->request); } } /** * Clean the data in the parameter bag. * * @param \Symfony\Component\HttpFoundation\ParameterBag $bag * @return void */ prote
protected function clean($request) { $this->cleanParameterBag($request->query); if ($request->isJson()) { $this->cleanParameterBag($request->json()); } elseif ($request->request !== $
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", "language": "php", "file_size": 2096, "cut_index": 563, "middle_length": 229 }
namespace Illuminate\Foundation\Http\Middleware\Concerns; trait ExcludesPaths { /** * Determine if the request has a URI that should be excluded. * * @param \Illuminate\Http\Request $request * @return bool */ protected function inExceptArray($request) { foreach ($this->g...
return true; } } return false; } /** * Get the URIs that should be excluded. * * @return array */ public function getExcludedPaths() { return $this->except ?? []; } }
cept)) {
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/Concerns/ExcludesPaths.php", "language": "php", "file_size": 788, "cut_index": 518, "middle_length": 14 }
erns; use Illuminate\Foundation\Testing\Wormhole; use Illuminate\Support\Carbon; trait InteractsWithTime { /** * @template TReturn of mixed * * Freeze time. * * @param (callable(\Illuminate\Support\Carbon): TReturn)|null $callback * @return ($callback is null ? \Illuminate\Support\...
allback is null ? \Illuminate\Support\Carbon : TReturn) */ public function freezeSecond($callback = null) { $result = $this->travelTo($now = Carbon::now()->startOfSecond(), $callback); return is_null($callback) ? $now : $resul
$result; } /** * @template TReturn of mixed * * Freeze time at the beginning of the current second. * * @param (callable(\Illuminate\Support\Carbon): TReturn)|null $callback * @return ($c
{ "filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithTime.php", "language": "php", "file_size": 2044, "cut_index": 563, "middle_length": 229 }
erns; use Illuminate\Support\Facades\View as ViewFacade; use Illuminate\Support\MessageBag; use Illuminate\Support\ViewErrorBag; use Illuminate\Testing\TestComponent; use Illuminate\Testing\TestView; use Illuminate\View\View; trait InteractsWithViews { /** * Create a new TestView from the given view. * ...
Arrayable|array $data * @return \Illuminate\Testing\TestView */ protected function blade(string $template, $data = []) { $tempDirectory = sys_get_temp_dir(); if (! in_array($tempDirectory, ViewFacade::getFinder()->getPat
data = []) { return new TestView(view($view, $data)); } /** * Render the contents of the given Blade template string. * * @param string $template * @param \Illuminate\Contracts\Support\
{ "filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithViews.php", "language": "php", "file_size": 2394, "cut_index": 563, "middle_length": 229 }
se Illuminate\Http\Request; use Illuminate\Support\Collection; use Symfony\Component\ErrorHandler\Exception\FlattenException; class Exception { /** * The "flattened" exception instance. * * @var \Symfony\Component\ErrorHandler\Exception\FlattenException */ protected $exception; /** ...
nce. * * @param \Symfony\Component\ErrorHandler\Exception\FlattenException $exception * @param \Illuminate\Http\Request $request * @param \Illuminate\Foundation\Exceptions\Renderer\Listener $listener * @param string $basePa
undation\Exceptions\Renderer\Listener */ protected $listener; /** * The application's base path. * * @var string */ protected $basePath; /** * Creates a new exception renderer insta
{ "filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Exception.php", "language": "php", "file_size": 7913, "cut_index": 716, "middle_length": 229 }
se Throwable; /* * This file contains parts of https://github.com/spatie/laravel-ignition. * * (c) Spatie <info@spatie.be> * * For the full copyright and license information, please review its LICENSE: * * The MIT License (MIT) * * Copyright (c) Spatie <info@spatie.be> * * Permission is hereby granted, free...
he above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE W
the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * T
{ "filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Mappers/BladeMapper.php", "language": "php", "file_size": 10404, "cut_index": 921, "middle_length": 229 }
pace Illuminate\Foundation\Queue; use Illuminate\Bus\UniqueLock; use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Support\Facades\Context; trait InteractsWithUniqueJobs { /** * Store unique job information in the context in case we can't resolve the job on the queue side. * * @param m...
ormation from the context. * * @param mixed $job * @return void */ public function removeUniqueJobInformationFromContext($job): void { if ($job instanceof ShouldBeUnique) { Context::forgetHidden([
'laravel_unique_job_cache_store' => $this->getUniqueJobCacheStore($job), 'laravel_unique_job_key' => UniqueLock::getKey($job), ]); } } /** * Remove the unique job inf
{ "filepath": "src/Illuminate/Foundation/Queue/InteractsWithUniqueJobs.php", "language": "php", "file_size": 1481, "cut_index": 524, "middle_length": 229 }
pace Illuminate\Foundation\Auth; use Illuminate\Auth\Events\Verified; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; class EmailVerificationRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ pu...
n array */ public function rules() { return [ // ]; } /** * Fulfill the email verification request. * * @return void */ public function fulfill() { if (! $this->user()->h
$this->user()->getEmailForVerification()), (string) $this->route('hash'))) { return false; } return true; } /** * Get the validation rules that apply to the request. * * @retur
{ "filepath": "src/Illuminate/Foundation/Auth/EmailVerificationRequest.php", "language": "php", "file_size": 1415, "cut_index": 524, "middle_length": 229 }
lluminate\Foundation\Http\Attributes\FailOnUnknownFields; use Illuminate\Foundation\Http\Attributes\RedirectTo; use Illuminate\Foundation\Http\Attributes\RedirectToRoute; use Illuminate\Foundation\Http\Attributes\StopOnFirstFailure; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\Support\...
protected $redirector; /** * The URI to redirect to if validation fails. * * @var string */ protected $redirect; /** * The route to redirect to if validation fails. * * @var string */ protected $
** * The container instance. * * @var \Illuminate\Contracts\Container\Container */ protected $container; /** * The redirector instance. * * @var \Illuminate\Routing\Redirector */
{ "filepath": "src/Illuminate/Foundation/Http/FormRequest.php", "language": "php", "file_size": 11713, "cut_index": 921, "middle_length": 229 }
inate\Foundation\Routing\PrecognitionCallableDispatcher; use Illuminate\Foundation\Routing\PrecognitionControllerDispatcher; use Illuminate\Routing\Contracts\CallableDispatcher as CallableDispatcherContract; use Illuminate\Routing\Contracts\ControllerDispatcher as ControllerDispatcherContract; class HandlePrecognitive...
@param \Illuminate\Http\Request $request * @param \Closure $next * @return \Illuminate\Http\Response */ public function handle($request, $next) { if (! $request->isAttemptingPrecognition()) { return $this->ap
* @param \Illuminate\Container\Container $container */ public function __construct(Container $container) { $this->container = $container; } /** * Handle an incoming request. * *
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php", "language": "php", "file_size": 3397, "cut_index": 614, "middle_length": 229 }
te\Contracts\Foundation\Application; use Illuminate\Foundation\Http\MaintenanceModeBypassCookie; use Illuminate\Foundation\Http\Middleware\Concerns\ExcludesPaths; use Illuminate\Support\Arr; use Symfony\Component\HttpKernel\Exception\HttpException; class PreventRequestsDuringMaintenance { use ExcludesPaths; /...
eate a new middleware instance. * * @param \Illuminate\Contracts\Foundation\Application $app */ public function __construct(Application $app) { $this->app = $app; } /** * Handle an incoming request. *
* @var array<int, string> */ protected $except = []; /** * The URIs that should be accessible during maintenance. * * @var array */ protected static $neverPrevent = []; /** * Cr
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php", "language": "php", "file_size": 4953, "cut_index": 614, "middle_length": 229 }
are; use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; class TrimStrings extends TransformsRequest { /** * The attributes that should not be trimmed. * * @var array<int, string> */ protected $except = [ 'current_password', 'password', 'password_co...
$next * @return mixed */ public function handle($request, Closure $next) { foreach (static::$skipCallbacks as $callback) { if ($callback($request)) { return $next($request); } }
e registered skip callbacks. * * @var array */ protected static $skipCallbacks = []; /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/TrimStrings.php", "language": "php", "file_size": 2584, "cut_index": 563, "middle_length": 229 }
he request. * * @var array */ protected $unencryptedCookies = []; /** * Additional server variables for the request. * * @var array */ protected $serverVariables = []; /** * Indicates whether redirects should be followed. * * @var bool */ prot...
als = false; /** * Define additional headers to be sent with the request. * * @param array $headers * @return $this */ public function withHeaders(array $headers) { $this->defaultHeaders = array_merge($this->
hether JSON requests should be performed "with credentials" (cookies). * * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials * * @var bool */ protected $withCredenti
{ "filepath": "src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php", "language": "php", "file_size": 20509, "cut_index": 1331, "middle_length": 229 }
use Illuminate\Foundation\Exceptions\Renderer\Renderer; use Illuminate\Http\Exceptions\HttpResponseException; use Illuminate\Http\Exceptions\OriginMismatchException; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Response; use Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException; use Illuminate\Rou...
sr\Log\LoggerInterface; use Psr\Log\LogLevel; use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Symfony
use Illuminate\Support\Reflector; use Illuminate\Support\Str; use Illuminate\Support\Traits\ReflectsClosures; use Illuminate\Support\ViewErrorBag; use Illuminate\Validation\ValidationException; use InvalidArgumentException; use P
{ "filepath": "src/Illuminate/Foundation/Exceptions/Handler.php", "language": "php", "file_size": 33489, "cut_index": 1331, "middle_length": 229 }
ml> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>@yield('title')</title> <!-- Styles --> <style> html, body { background-color: #fff; color: #636b6f; ...
.flex-center { align-items: center; display: flex; justify-content: center; } .position-ref { position: relative; } .content {
ji", "Segoe UI Symbol", "Noto Color Emoji"; font-weight: 100; height: 100vh; margin: 0; } .full-height { height: 100vh; }
{ "filepath": "src/Illuminate/Foundation/Exceptions/views/layout.blade.php", "language": "php", "file_size": 1435, "cut_index": 524, "middle_length": 229 }
use Illuminate\Contracts\Validation\Factory; use Illuminate\Foundation\Precognition; use Illuminate\Http\Request; use Illuminate\Validation\ValidationException; trait ValidatesRequests { /** * Run the validation routine against the given validator. * * @param \Illuminate\Contracts\Validation\Valid...
} if ($request->isPrecognitive()) { $validator->after(Precognition::afterValidationHook($request)) ->setRules( $request->filterPrecognitiveRules($validator->getRulesWithoutPlaceholders())
validateWith($validator, ?Request $request = null) { $request = $request ?: request(); if (is_array($validator)) { $validator = $this->getValidationFactory()->make($request->all(), $validator);
{ "filepath": "src/Illuminate/Foundation/Validation/ValidatesRequests.php", "language": "php", "file_size": 2959, "cut_index": 563, "middle_length": 229 }
?php namespace Illuminate\Foundation\Http\Middleware; use Closure; use Illuminate\Container\Container; use Illuminate\Http\Request; use Illuminate\Support\Defer\DeferredCallbackCollection; use Symfony\Component\HttpFoundation\Response; class InvokeDeferredCallbacks { /** * Handle the incoming request. ...
onse * @return void */ public function terminate(Request $request, Response $response) { Container::getInstance() ->make(DeferredCallbackCollection::class) ->invokeWhen(fn ($callback) => $response->getStatu
, Closure $next) { return $next($request); } /** * Invoke the deferred callbacks. * * @param \Illuminate\Http\Request $request * @param \Symfony\Component\HttpFoundation\Response $resp
{ "filepath": "src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php", "language": "php", "file_size": 1043, "cut_index": 513, "middle_length": 229 }
e Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Reflector; use Illuminate\Support\Str; use ReflectionClass; use ReflectionException; use ReflectionMethod; use SplFileInfo; use Symfony\Component\Finder\Finder; class DiscoverEvents { /** * The callback to be used to guess cla...
{ if (Arr::wrap($listenerPath) === []) { return []; } $listeners = new Collection(static::getListenerEvents( Finder::create()->files()->in($listenerPath), $basePath )); $discoveredEvents = [
searching the given listener directory. * * @param array<int, string>|string $listenerPath * @param string $basePath * @return array */ public static function within($listenerPath, $basePath)
{ "filepath": "src/Illuminate/Foundation/Events/DiscoverEvents.php", "language": "php", "file_size": 3923, "cut_index": 614, "middle_length": 229 }
pace Illuminate\Foundation\Http; use Illuminate\Support\Carbon; use Symfony\Component\HttpFoundation\Cookie; class MaintenanceModeBypassCookie { /** * Create a new maintenance mode bypass cookie. * * @param string $key * @return \Symfony\Component\HttpFoundation\Cookie */ public sta...
aintenance mode bypass cookie is valid. * * @param string $cookie * @param string $key * @return bool */ public static function isValid(string $cookie, string $key) { $payload = json_decode(base64_decode($cookie
=> $expiresAt->getTimestamp(), 'mac' => hash_hmac('sha256', $expiresAt->getTimestamp(), $key), ])), $expiresAt, config('session.path'), config('session.domain')); } /** * Determine if the given m
{ "filepath": "src/Illuminate/Foundation/Http/MaintenanceModeBypassCookie.php", "language": "php", "file_size": 1331, "cut_index": 524, "middle_length": 229 }
Filesystem\join_paths; class Frame { use ResolvesDumpSource; /** * The "flattened" exception instance. * * @var \Symfony\Component\ErrorHandler\Exception\FlattenException */ protected $exception; /** * The application's class map. * * @var array<string, string> ...
Renderer\Frame|null */ protected $previous; /** * Whether this frame is the main (first non-vendor) frame. * * @var bool */ protected $isMain = false; /** * Create a new frame instance. * * @param
ring} */ protected $frame; /** * The application's base path. * * @var string */ protected $basePath; /** * The previous frame. * * @var \Illuminate\Foundation\Exceptions\
{ "filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Frame.php", "language": "php", "file_size": 5750, "cut_index": 716, "middle_length": 229 }
uminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\HasCollection; use Illuminate\Database\Eloquent\Model; class DatabaseNotification extends Model { /** @use HasCollection<DatabaseNotificationCollection> */ use HasCollection; /** * The "type" of the primary key ID. * * @var...
/** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'data' => 'array', 'read_at' => 'datetime', ]; /** * The type of collection that should be used for th
The table associated with the model. * * @var string */ protected $table = 'notifications'; /** * The guarded attributes on the model. * * @var array */ protected $guarded = [];
{ "filepath": "src/Illuminate/Notifications/DatabaseNotification.php", "language": "php", "file_size": 2911, "cut_index": 563, "middle_length": 229 }
ass; use ReflectionMethod; use RuntimeException; use Throwable; trait Macroable { /** * The registered string macros. * * @var array */ protected static $macros = []; /** * Register a custom macro. * * @param string $name * @param object|callable $macro * ...
e) { $methods = (new ReflectionClass($mixin))->getMethods( ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED ); foreach ($methods as $method) { if ($replace || ! static::hasMacro($method->name
Mix another object into the class. * * @param object $mixin * @param bool $replace * @return void * * @throws \ReflectionException */ public static function mixin($mixin, $replace = tru
{ "filepath": "src/Illuminate/Macroable/Traits/Macroable.php", "language": "php", "file_size": 3060, "cut_index": 614, "middle_length": 229 }
ents Renderable { use Conditionable; /** * The view to be rendered. * * @var array|string */ public $view; /** * The view data for the message. * * @var array */ public $viewData = []; /** * The Markdown template to render (if applicable). * ...
$replyTo = []; /** * The "cc" information for the message. * * @var array */ public $cc = []; /** * The "bcc" information for the message. * * @var array */ public $bcc = []; /** * The att
blic $theme; /** * The "from" information for the message. * * @var array */ public $from = []; /** * The "reply to" information for the message. * * @var array */ public
{ "filepath": "src/Illuminate/Notifications/Messages/MailMessage.php", "language": "php", "file_size": 10169, "cut_index": 921, "middle_length": 229 }
pace Illuminate\JsonSchema; use Closure; use Illuminate\Contracts\JsonSchema\JsonSchema as JsonSchemaContract; class JsonSchemaTypeFactory extends JsonSchema implements JsonSchemaContract { /** * Create a new object schema instance. * * @param (Closure(JsonSchemaTypeFactory): array<string, Types\T...
n new Types\ArrayType; } /** * Create a new string property instance. */ public function string(): Types\StringType { return new Types\StringType; } /** * Create a new integer property instance. */
$properties = $properties($this); } return new Types\ObjectType($properties); } /** * Create a new array property instance. */ public function array(): Types\ArrayType { retur
{ "filepath": "src/Illuminate/JsonSchema/JsonSchemaTypeFactory.php", "language": "php", "file_size": 1428, "cut_index": 524, "middle_length": 229 }
properties to ignore when serializing. * * @var array<int, string> */ protected static array $ignore = ['required', 'nullable']; /** * Serialize the given property to an array. * * @return array<string, mixed> * * @throws \RuntimeException */ public static funct...
', Types\ObjectType::class => 'object', Types\StringType::class => 'string', default => throw new RuntimeException('Unsupported ['.get_class($type).'] type.'), }; $nullable = static::isNullable($type);
pe'] = match (get_class($type)) { Types\ArrayType::class => 'array', Types\BooleanType::class => 'boolean', Types\IntegerType::class => 'integer', Types\NumberType::class => 'number
{ "filepath": "src/Illuminate/JsonSchema/Serializer.php", "language": "php", "file_size": 3167, "cut_index": 614, "middle_length": 229 }
pace Illuminate\JsonSchema\Types; class ArrayType extends Type { /** * The minimum number of items (inclusive). */ protected ?int $minItems = null; /** * The maximum number of items (inclusive). */ protected ?int $maxItems = null; /** * The schema of the items contained i...
c function max(int $value): static { $this->maxItems = $value; return $this; } /** * Set the schema for array items. */ public function items(Type $type): static { $this->items = $type; retur
number of items (inclusive). */ public function min(int $value): static { $this->minItems = $value; return $this; } /** * Set the maximum number of items (inclusive). */ publi
{ "filepath": "src/Illuminate/JsonSchema/Types/ArrayType.php", "language": "php", "file_size": 1453, "cut_index": 524, "middle_length": 229 }
hp namespace Illuminate\JsonSchema\Types; class IntegerType extends Type { /** * The minimum value (inclusive). */ protected ?int $minimum = null; /** * The maximum value (inclusive). */ protected ?int $maximum = null; /** * The number the value must be a multiple of. ...
value must be a multiple of. */ public function multipleOf(int $value): static { $this->multipleOf = $value; return $this; } /** * Set the type's default value. */ public function default(int $value): s
return $this; } /** * Set the maximum value (inclusive). */ public function max(int $value): static { $this->maximum = $value; return $this; } /** * Set the number the
{ "filepath": "src/Illuminate/JsonSchema/Types/IntegerType.php", "language": "php", "file_size": 1076, "cut_index": 515, "middle_length": 229 }
namespace Illuminate\JsonSchema\Types; class NumberType extends Type { /** * The minimum value (inclusive). */ protected int|float|null $minimum = null; /** * The maximum value (inclusive). */ protected int|float|null $maximum = null; /** * The number the value must be a...
} /** * Set the number the value must be a multiple of. */ public function multipleOf(int|float $value): static { $this->multipleOf = $value; return $this; } /** * Set the type's default value. *
$this->minimum = $value; return $this; } /** * Set the maximum value (inclusive). */ public function max(int|float $value): static { $this->maximum = $value; return $this;
{ "filepath": "src/Illuminate/JsonSchema/Types/NumberType.php", "language": "php", "file_size": 1129, "cut_index": 518, "middle_length": 229 }
espace Illuminate\JsonSchema\Types; class ObjectType extends Type { /** * Whether additional properties are allowed. */ protected ?bool $additionalProperties = null; /** * Create a new object type instance. * * @param array<string, Type> $properties */ public function _...
itionalProperties = false; return $this; } /** * Set the type's default value. * * @param array<string, mixed> $value */ public function default(array $value): static { $this->default = $value;
$this->add
{ "filepath": "src/Illuminate/JsonSchema/Types/ObjectType.php", "language": "php", "file_size": 817, "cut_index": 522, "middle_length": 14 }
pace Illuminate\JsonSchema\Types; class StringType extends Type { /** * The minimum length (inclusive). */ protected ?int $minLength = null; /** * The maximum length (inclusive). */ protected ?int $maxLength = null; /** * A regular expression the value must match. */...
this->maxLength = $value; return $this; } /** * Set the pattern the value must satisfy. */ public function pattern(string $value): static { $this->pattern = $value; return $this; } /** * Se
public function min(int $value): static { $this->minLength = $value; return $this; } /** * Set the maximum length (inclusive). */ public function max(int $value): static { $
{ "filepath": "src/Illuminate/JsonSchema/Types/StringType.php", "language": "php", "file_size": 1441, "cut_index": 524, "middle_length": 229 }
BackedEnum; use Illuminate\JsonSchema\JsonSchema; use Illuminate\JsonSchema\Serializer; use InvalidArgumentException; abstract class Type extends JsonSchema { /** * Whether the type is required. */ protected ?bool $required = null; /** * The type's title. */ protected ?string $titl...
le = null; /** * Indicate that the type is required. */ public function required(bool $required = true): static { $this->required = $required ?: null; return $this; } /** * Indicate that the type is opt
; /** * The set of allowed values for the type. * * @var array<int, mixed>|null */ protected ?array $enum = null; /** * Indicates if the type is nullable. */ protected ?bool $nullab
{ "filepath": "src/Illuminate/JsonSchema/Types/Type.php", "language": "php", "file_size": 2809, "cut_index": 563, "middle_length": 229 }
- | Application Name |-------------------------------------------------------------------------- | | This value is the name of your application, which will be used when the | framework needs to place the application's name in a notification or | other UI elements where an application name needs ...
ious | services the application utilizes. Set this in your ".env" file. | */ 'env' => env('APP_ENV', 'production'), /* |-------------------------------------------------------------------------- | Application Debug Mode |-
|-------------------------------------------------------------------------- | | This value determines the "environment" your application is currently | running in. This may determine how you prefer to configure var
{ "filepath": "config-stubs/app.php", "language": "php", "file_size": 4263, "cut_index": 614, "middle_length": 229 }
namespace Illuminate\Tests\Database; use Illuminate\Database\Connection; use Illuminate\Database\Schema\Grammars\Grammar; use Mockery as m; use PHPUnit\Framework\TestCase; class DatabaseAbstractSchemaGrammarTest extends TestCase { public function testCreateDatabase() { $connection = m::mock(Connecti...
tDropDatabaseIfExists() { $connection = m::mock(Connection::class); $grammar = new class($connection) extends Grammar { }; $this->assertSame('drop database if exists "foo"', $grammar->compileDropDatabaseIfExists('foo'))
c function tes
{ "filepath": "tests/Database/DatabaseAbstractSchemaGrammarTest.php", "language": "php", "file_size": 797, "cut_index": 517, "middle_length": 14 }
uminate\Database\Eloquent\Concerns\HasAttributes; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; use Mockery as m; use PHPUnit\Framework\TestCase; class DatabaseConcernsHasAttributesTest extends TestCase { public function testWithoutConstructor() { $instance = new HasAttribu...
n testRelationsToArray() { $mock = m::mock(HasAttributesWithoutConstructor::class) ->makePartial() ->shouldAllowMockingProtectedMethods() ->shouldReceive('getArrayableRelations')->andReturn([
guments() { $instance = new HasAttributesWithConstructorArguments(null); $attributes = $instance->getMutatedAttributes(); $this->assertEquals(['some_attribute'], $attributes); } public functio
{ "filepath": "tests/Database/DatabaseConcernsHasAttributesTest.php", "language": "php", "file_size": 3187, "cut_index": 614, "middle_length": 229 }
ecursiveCallsArePreventedWithoutPreventingSubsequentCalls() { $instance = new PreventsCircularRecursionWithRecursiveMethod(); $this->assertEquals(0, PreventsCircularRecursionWithRecursiveMethod::$globalStack); $this->assertEquals(0, $instance->instanceStack); $this->assertEquals(0,...
veDefaultCallbackIsCalledOnlyOnRecursion() { $instance = new PreventsCircularRecursionWithRecursiveMethod(); $this->assertEquals(0, PreventsCircularRecursionWithRecursiveMethod::$globalStack); $this->assertEquals(0, $instance->
assertEquals(1, $instance->callStack()); $this->assertEquals(2, PreventsCircularRecursionWithRecursiveMethod::$globalStack); $this->assertEquals(2, $instance->instanceStack); } public function testRecursi
{ "filepath": "tests/Database/DatabaseConcernsPreventsCircularRecursionTest.php", "language": "php", "file_size": 10137, "cut_index": 921, "middle_length": 229 }