id
stringlengths
6
6
text
stringlengths
20
17.2k
title
stringclasses
1 value
194553
<?php namespace Illuminate\Auth\Middleware; use Closure; use Illuminate\Auth\AuthenticationException; use Illuminate\Contracts\Auth\Factory as Auth; use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests; use Illuminate\Http\Request; class Authenticate implements AuthenticatesRequests { /** * The au...
194558
class Gate implements GateContract { use HandlesAuthorization; /** * The container instance. * * @var \Illuminate\Contracts\Container\Container */ protected $container; /** * The user resolver callable. * * @var callable */ protected $userResolver; /** ...
194588
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSRF Token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ config('app.name', 'Laravel') }}</tit...
194623
<x-mail::layout> {{-- Header --}} <x-slot:header> <x-mail::header :url="config('app.url')"> {{ config('app.name') }} </x-mail::header> </x-slot:header> {{-- Body --}} {{ $slot }} {{-- Subcopy --}} @isset($subcopy) <x-slot:subcopy> <x-mail::subcopy> {{ $subcopy }} </x-mail::subcopy> </x-slot:subcopy> @endisset {{-- F...
194632
<x-mail::layout> {{-- Header --}} <x-slot:header> <x-mail::header :url="config('app.url')"> {{ config('app.name') }} </x-mail::header> </x-slot:header> {{-- Body --}} {{ $slot }} {{-- Subcopy --}} @isset($subcopy) <x-slot:subcopy> <x-mail::su...
194646
<?php namespace Illuminate\Contracts\Encryption; interface StringEncrypter { /** * Encrypt a string without serialization. * * @param string $value * @return string * * @throws \Illuminate\Contracts\Encryption\EncryptException */ public function encryptString(#[\SensitiveP...
194691
<?php namespace Illuminate\Contracts\Auth; interface Guard { /** * Determine if the current user is authenticated. * * @return bool */ public function check(); /** * Determine if the current user is a guest. * * @return bool */ public function guest(); /**...
194717
<?php namespace Illuminate\Contracts\Container; interface ContextualBindingBuilder { /** * Define the abstract target that depends on the context. * * @param string $abstract * @return $this */ public function needs($abstract); /** * Define the implementation for the conte...
194737
<?php namespace Illuminate\Contracts\View; use Illuminate\Contracts\Support\Renderable; interface View extends Renderable { /** * Get the name of the view. * * @return string */ public function name(); /** * Add a piece of data to the view. * * @param string|array $k...
194787
/** * Get the path to the application "app" directory. * * @param string $path * @return string */ public function path($path = '') { return $this->joinPaths($this->appPath ?: $this->basePath('app'), $path); } /** * Set the application directory. * * @p...
194788
public function runningInConsole() { if ($this->isRunningInConsole === null) { $this->isRunningInConsole = Env::get('APP_RUNNING_IN_CONSOLE') ?? (\PHP_SAPI === 'cli' || \PHP_SAPI === 'phpdbg'); } return $this->isRunningInConsole; } /** * Determine if the applicatio...
194809
<?php use Illuminate\Container\Container; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Contracts\Auth\Factory as AuthFactory; use Illuminate\Contracts\Broadcasting\Factory as BroadcastFactory; use Illuminate\Contracts\Bus\Dispatcher; use Illuminate\Contracts\Cookie\Factory as CookieFactory; use Illuminate...
194816
{ /** * 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 app...
194817
/** * Register additional middleware aliases. * * @param array $aliases * @return $this */ public function alias(array $aliases) { $this->customAliases = $aliases; return $this; } /** * Define the middleware priority for the application. * * @p...
194821
class ApplicationBuilder { /** * The service provider that are marked for registration. * * @var array */ protected array $pendingProviders = []; /** * Any additional routing callbacks that should be invoked while registering routes. * * @var array */ protected a...
194824
<?php namespace Illuminate\Foundation\Bootstrap; 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...
194825
<?php namespace Illuminate\Foundation\Bootstrap; use Illuminate\Config\Repository; use Illuminate\Contracts\Config\Repository as RepositoryContract; use Illuminate\Contracts\Foundation\Application; use SplFileInfo; use Symfony\Component\Finder\Finder; class LoadConfiguration { /** * Bootstrap the given appl...
194828
<?php namespace Illuminate\Foundation\Bootstrap; use Illuminate\Contracts\Foundation\Application; use Illuminate\Foundation\AliasLoader; use Illuminate\Foundation\PackageManifest; use Illuminate\Support\Facades\Facade; class RegisterFacades { /** * Bootstrap the given application. * * @param \Ill...
194832
<?php namespace Illuminate\Foundation\Auth; use Illuminate\Auth\Authenticatable; use Illuminate\Auth\MustVerifyEmail; use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use...
194833
<?php namespace 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 ...
194835
<?php namespace Illuminate\Foundation\Auth\Access; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Support\Str; trait AuthorizesRequests { /** * Authorize a given action for the current user. * * @param mixed $ability * @param mixed|array $arguments * @return \Illuminate\Au...
194846
const defaultTheme = require('tailwindcss/defaultTheme'); /** @type {import('tailwindcss').Config} */ module.exports = { content: ['./**/*.blade.php'], darkMode: 'class', theme: { extend: { fontFamily: { sans: ['Figtree', ...defaultTheme.fontFamily.sans], }, ...
194847
@import 'tippy.js/dist/tippy.css'; @import 'tippy.js/themes/material.css'; @import 'tippy.js/animations/scale.css'; @tailwind base; @tailwind components; @tailwind utilities; [x-cloak] { display: none; } html { tab-size: 4; } table.hljs-ln { color: inherit; font-size: inherit; border-spacing: 2p...
194856
.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000...
194871
Q("for",(e,{expression:t},{effect:n,cleanup:r})=>{let i=Hu(t),o=ae(e,i.items),a=ae(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},n(()=>ju(e,i,o,a)),r(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function ju(e,t,n,r){let i=a=>typeof a=="object"&&!Arr...
194887
<script> (function () { const darkStyles = document.querySelector('style[data-theme="dark"]')?.textContent const lightStyles = document.querySelector('style[data-theme="light"]')?.textContent const removeStyles = () => { document.querySelector('style[data-theme="dark"]')?.remov...
194888
<div class="hidden overflow-x-auto sm:col-span-1 lg:block"> <div class="h-[35.5rem] scrollbar-hidden trace text-sm text-gray-400 dark:text-gray-300" > <div class="mb-2 inline-block rounded-full bg-red-500/20 px-3 py-2 dark:bg-red-500/20 sm:col-span-1"> <button @click=...
194904
protected function renderViaCallbacks($request, Throwable $e) { foreach ($this->renderCallbacks as $renderCallback) { foreach ($this->firstClosureParameterTypes($renderCallback) as $type) { if (is_a($e, $type)) { $response = $renderCallback($e, $request); ...
194917
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>@yield('title')</title> <style> /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-...
194933
<?php namespace Illuminate\Foundation\Testing; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Application; use PHPUnit\Framework\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { use Concerns\InteractsWithContainer, Concerns\MakesHttpRequests, Concerns\I...
194947
trait MakesHttpRequests { /** * Additional headers for the request. * * @var array */ protected $defaultHeaders = []; /** * Additional cookies for the request. * * @var array */ protected $defaultCookies = []; /** * Additional cookies will not be encryp...
194948
public function getJson($uri, array $headers = [], $options = 0) { return $this->json('GET', $uri, [], $headers, $options); } /** * Visit the given URI with a POST request. * * @param string $uri * @param array $data * @param array $headers * @return \Illuminate\...
194961
<?php namespace Illuminate\Foundation\Http; use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\Access\Response; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Validation\Factory as ValidationFactory; use Illuminate\Contracts\Validation\ValidatesWhenResolved; use Illuminate\...
194965
class Kernel implements KernelContract { use InteractsWithTime; /** * The application implementation. * * @var \Illuminate\Contracts\Foundation\Application */ protected $app; /** * The router instance. * * @var \Illuminate\Routing\Router */ protected $router...
194966
public function prependMiddleware($middleware) { if (array_search($middleware, $this->middleware) === false) { array_unshift($this->middleware, $middleware); } return $this; } /** * Add a new middleware to end of the stack if it does not already exist. * ...
194970
<?php namespace Illuminate\Foundation\Http\Middleware; use Closure; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Support\Responsable; use Illuminate\Cookie\CookieValuePrefix; use Illuminat...
194986
<?php namespace Illuminate\Foundation\Events; class LocaleUpdated { /** * The new locale. * * @var string */ public $locale; /** * Create a new event instance. * * @param string $locale * @return void */ public function __construct($locale) { ...
195004
<?php namespace Illuminate\Foundation\Console; use 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 { ...
195023
<?php namespace Illuminate\Foundation\Console; use 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 = 's...
195028
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Process; use Symfony\Component\Console\Attribute\AsCommand; use function Illuminate\Support\php_binary; #[AsCommand(name: 'install:api')] class ApiInstallCommand extend...
195029
<?php namespace Illuminate\Foundation\Console; use Composer\InstalledVersions; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Process; use Symfony\Component\Console\Attribute\AsCommand; use function Illuminate\Support\php_binary; use function Laravel\Prompts\conf...
195046
<?php 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 ...
195054
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Support\ServiceProvider; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'optimize:clear')] class OptimizeClearCommand extends Command { /** * The console command name. * * @var strin...
195074
<?php namespace {{ namespace }}; use Illuminate\Foundation\Http\FormRequest; class {{ class }} extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return false; } /** * Get the validation rules that a...
195076
<?php namespace {{ namespace }}; use Illuminate\Auth\Access\Response; use {{ namespacedModel }}; use {{ namespacedUserModel }}; class {{ class }} { /** * Determine whether the user can view any models. */ public function viewAny({{ user }} $user): bool { // } /** * Determi...
195116
<?php use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; Route::get('/user', function (Request $request) { return $request->user(); })->middleware('auth:sanctum');
195156
class Filesystem { use Conditionable, Macroable; /** * Determine if a file or directory exists. * * @param string $path * @return bool */ public function exists($path) { return file_exists($path); } /** * Determine if a file or directory is missing. ...
195157
/** * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file. * * @param string $target * @param string $link * @return bool|null */ public function link($target, $link) { if (! windows_os()) { return sym...
195159
<?php namespace Illuminate\Filesystem; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; use League\Flysystem\PathTraversalDetected; class ServeFile { /** * Create a new invokable controller to serve files. */ public function __construct(protected string $disk, protected ...
195165
/** * Write the contents of a file. * * @param string $path * @param \Psr\Http\Message\StreamInterface|\Illuminate\Http\File|\Illuminate\Http\UploadedFile|string|resource $contents * @param mixed $options * @return string|bool */ public function put($path, $contents, $option...
195166
public function writeStream($path, $resource, array $options = []) { try { $this->driver->writeStream($path, $resource, $options); } catch (UnableToWriteFile|UnableToSetVisibility $e) { throw_if($this->throwsExceptions(), $e); return false; } ret...
195186
class AssertableJsonString implements ArrayAccess, Countable { /** * The original encoded json. * * @var \Illuminate\Contracts\Support\Jsonable|\JsonSerializable|array|string */ public $json; /** * The decoded json contents. * * @var array|null */ protected $deco...
195219
public function build($concrete) { // If the concrete type is actually a Closure, we will just execute it and // hand back the results of the functions, which allows functions to be // used as resolvers for more fine-tuned resolution of these objects. if ($concrete instanceof Closure...
195222
<?php namespace Illuminate\Container; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Container\ContextualBindingBuilder as ContextualBindingBuilderContract; class ContextualBindingBuilder implements ContextualBindingBuilderContract { /** * The underlying container instance. * ...
195278
class ValidatedInput implements ValidatedData { /** * The underlying input. * * @var array */ protected $input; /** * Create a new validated input container. * * @param array $input * @return void */ public function __construct(array $input) { ...
195280
<?php namespace Illuminate\Support; use Closure; use Illuminate\Filesystem\Filesystem; use RuntimeException; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\Process; class Composer { /** * The filesystem instance. * * @var \Illuminate\Filesystem\Filesystem ...
195284
<?php namespace Illuminate\Support; use Carbon\Factory; use InvalidArgumentException; /** * @see https://carbon.nesbot.com/docs/ * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php * * @method \Illuminate\Support\Carbon create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, ...
195343
<?php namespace Illuminate\Support\Facades; use Laravel\Ui\UiServiceProvider; use RuntimeException; /** * @method static \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard guard(string|null $name = null) * @method static \Illuminate\Auth\SessionGuard createSessionDriver(string $name, array $...
195363
<?php namespace Illuminate\Support\Facades; use Illuminate\Database\Console\Migrations\FreshCommand; use Illuminate\Database\Console\Migrations\RefreshCommand; use Illuminate\Database\Console\Migrations\ResetCommand; use Illuminate\Database\Console\WipeCommand; /** * @method static \Illuminate\Database\Connection c...
195383
abstract class Facade { /** * The application instance being facaded. * * @var \Illuminate\Contracts\Foundation\Application|null */ protected static $app; /** * The resolved object instances. * * @var array */ protected static $resolvedInstance; /** * I...
195438
class PendingRequest { use Conditionable, Macroable; /** * The factory instance. * * @var \Illuminate\Http\Client\Factory|null */ protected $factory; /** * The Guzzle client instance. * * @var \GuzzleHttp\Client */ protected $client; /** * The Guzz...
195439
/** * Add the given header to the request. * * @param string $name * @param mixed $value * @return $this */ public function withHeader($name, $value) { return $this->withHeaders([$name => $value]); } /** * Replace the given headers on the request. * ...
195440
public function dump() { $values = func_get_args(); return $this->beforeSending(function (Request $request, array $options) use ($values) { foreach (array_merge($values, [$request, $options]) as $value) { VarDumper::dump($value); } }); } /** ...
195441
protected function parseMultipartBodyFormat(array $data) { return collect($data)->map(function ($value, $key) { return is_array($value) ? $value : ['name' => $key, 'contents' => $value]; })->values()->all(); } /** * Send an asynchronous request to the given URL. * ...
195473
{ use Macroable { __call as macroCall; } /** * The view factory instance. * * @var \Illuminate\View\Factory */ protected $factory; /** * The engine implementation. * * @var \Illuminate\Contracts\View\Engine */ protected $engine; /** * T...
195474
/** * Determine if a piece of data is bound. * * @param string $key * @return bool */ public function offsetExists($key): bool { return array_key_exists($key, $this->data); } /** * Get a piece of bound data to the view. * * @param string $key * @...
195478
<?php namespace Illuminate\View\Middleware; use Closure; use Illuminate\Contracts\View\Factory as ViewFactory; use Illuminate\Support\ViewErrorBag; class ShareErrorsFromSession { /** * The view factory implementation. * * @var \Illuminate\Contracts\View\Factory */ protected $view; /*...
195542
class Worker { use DetectsLostConnections; const EXIT_SUCCESS = 0; const EXIT_ERROR = 1; const EXIT_MEMORY_LIMIT = 12; /** * The name of the worker. * * @var string */ protected $name; /** * The queue manager instance. * * @var \Illuminate\Contracts\Queu...
195543
protected function stopIfNecessary(WorkerOptions $options, $lastRestart, $startTime = 0, $jobsProcessed = 0, $job = null) { return match (true) { $this->shouldQuit => static::EXIT_SUCCESS, $this->memoryExceeded($options->memory) => static::EXIT_MEMORY_LIMIT, $this->queueS...
195621
#[AsCommand(name: 'queue:work')] class WorkCommand extends Command { use InteractsWithTime; /** * The console command name. * * @var string */ protected $signature = 'queue:work {connection? : The name of the queue connection to work} ...
195633
class LogManager implements LoggerInterface { use ParsesLogConfiguration; /** * The application instance. * * @var \Illuminate\Contracts\Foundation\Application */ protected $app; /** * The array of resolved channels. * * @var array */ protected $channels = [...
195634
protected function createDailyDriver(array $config) { return new Monolog($this->parseChannel($config), [ $this->prepareHandler(new RotatingFileHandler( $config['path'], $config['days'] ?? 7, $this->level($config), $config['bubble'] ?? true, $config['permission'] ?...
195659
<?php namespace Illuminate\Routing; use BadMethodCallException; abstract class Controller { /** * The middleware registered on the controller. * * @var array */ protected $middleware = []; /** * Register middleware on the controller. * * @param \Closure|array|string ...
195666
<?php namespace Illuminate\Routing; use Illuminate\Contracts\Routing\UrlRoutable; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException; use Illuminate\Support\Reflector; use Illuminate\Support\Str; cla...
195671
class UrlGenerator implements UrlGeneratorContract { use InteractsWithTime, Macroable; /** * The route collection. * * @var \Illuminate\Routing\RouteCollectionInterface */ protected $routes; /** * The request instance. * * @var \Illuminate\Http\Request */ pr...
195674
<?php namespace Illuminate\Routing; use Illuminate\Support\Arr; use function Illuminate\Support\enum_value; trait CreatesRegularExpressionRouteConstraints { /** * Specify that the given route parameters must be alphabetic. * * @param array|string $parameters * @return $this */ pub...
195680
public function parameter($name, $default = null) { return Arr::get($this->parameters(), $name, $default); } /** * Get original value of a given parameter from the route. * * @param string $name * @param string|null $default * @return string|null */ public func...
195684
<?php namespace Illuminate\Routing; use Illuminate\Support\Str; class ResourceRegistrar { /** * The router instance. * * @var \Illuminate\Routing\Router */ protected $router; /** * The default actions for a resourceful controller. * * @var string[] */ protecte...
195685
/** * Add the create method for a resourceful route. * * @param string $name * @param string $base * @param string $controller * @param array $options * @return \Illuminate\Routing\Route */ protected function addResourceCreate($name, $base, $controller, $options) ...
195686
protected function setResourceBindingFields($route, $bindingFields) { preg_match_all('/(?<={).*?(?=})/', $route->uri, $matches); $fields = array_fill_keys($matches[0], null); $route->setBindingFields(array_replace( $fields, array_intersect_key($bindingFields, $fields) )...
195691
class Router implements BindingRegistrar, RegistrarContract { use Macroable { __call as macroCall; } use Tappable; /** * The event dispatcher instance. * * @var \Illuminate\Contracts\Events\Dispatcher */ protected $events; /** * The IoC container instance. ...
195728
<?php namespace Illuminate\Routing\Controllers; interface HasMiddleware { /** * Get the middleware that should be assigned to the controller. * * @return \Illuminate\Routing\Controllers\Middleware[] */ public static function middleware(); }
195730
<?php namespace Illuminate\Routing\Console; use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'make:middleware')] class MiddlewareMakeCommand extends GeneratorCommand { use CreatesMatchingTest; /...
195735
<?php namespace {{ namespace }}; use {{ rootNamespace }}Http\Controllers\Controller; use Illuminate\Http\Request; class {{ class }} extends Controller { /** * Display a listing of the resource. */ public function index() { // } /** * Show the form for creating a new resour...
195741
<?php namespace {{ namespace }}; use {{ rootNamespace }}Http\Controllers\Controller; use Illuminate\Http\Request; class {{ class }} extends Controller { /** * Display a listing of the resource. */ public function index() { // } /** * Store a newly created resource in stora...
195773
public function has($key); /** * Determine if any of the keys exist in the collection. * * @param mixed $key * @return bool */ public function hasAny($key); /** * Concatenate values of a given key as a string. * * @param (callable(TValue, TKey): mixed)|string $v...
195774
/** * Partition the collection into two arrays using the given callback or key. * * @param (callable(TValue, TKey): bool)|TValue|string $key * @param mixed $operator * @param mixed $value * @return static<int<0, 1>, static<TKey, TValue>> */ public function partition($key, $o...
195778
public function diffKeysUsing($items, callable $callback) { return new static(array_diff_ukey($this->items, $this->getArrayableItems($items), $callback)); } /** * Retrieve duplicate items from the collection. * * @param (callable(TValue): bool)|string|null $callback * @param ...
195779
public function hasAny($key) { if ($this->isEmpty()) { return false; } $keys = is_array($key) ? $key : func_get_args(); foreach ($keys as $value) { if ($this->has($value)) { return true; } } return false; } ...
195782
public function sortBy($callback, $options = SORT_REGULAR, $descending = false) { if (is_array($callback) && ! is_callable($callback)) { return $this->sortByMany($callback, $options); } $results = []; $callback = $this->valueRetriever($callback); // First we wi...
195786
public static function get($array, $key, $default = null) { if (! static::accessible($array)) { return value($default); } if (is_null($key)) { return $array; } if (static::exists($array, $key)) { return $array[$key]; } if...
195791
/** * Determine if the collection is not empty. * * @phpstan-assert-if-true TValue $this->first() * @phpstan-assert-if-true TValue $this->last() * * @phpstan-assert-if-false null $this->first() * @phpstan-assert-if-false null $this->last() * * @return bool */ public...
195832
public function after($callback) { if (is_array($callback) && ! is_callable($callback)) { foreach ($callback as $rule) { $this->after(method_exists($rule, 'after') ? $rule->after(...) : $rule); } return $this; } $this->after[] = fn () => ...
195840
<?php namespace Illuminate\Validation; use Illuminate\Foundation\Precognition; /** * Provides default implementation of ValidatesWhenResolved contract. */ trait ValidatesWhenResolvedTrait { /** * Validate the class instance. * * @return void */ public function validateResolved() { ...
195868
trait ValidatesAttributes { /** * Validate that an attribute was "accepted". * * This validation rule implies the attribute is "required". * * @param string $attribute * @param mixed $value * @return bool */ public function validateAccepted($attribute, $value) { ...
195871
/** * Validate an attribute is unique among other values. * * @param string $attribute * @param mixed $value * @param array<int, int|string> $parameters * @return bool */ public function validateDistinct($attribute, $value, $parameters) { $data = Arr::except($thi...
195993
<?php namespace Illuminate\Session; use Illuminate\Contracts\Cache\Factory as CacheFactory; use Illuminate\Session\Middleware\StartSession; use Illuminate\Support\ServiceProvider; class SessionServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ ...
195994
<?php namespace Illuminate\Session; use Exception; class TokenMismatchException extends Exception { // }
195995
<?php namespace Illuminate\Session; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Carbon; use SessionHandlerInterface; use Symfony\Component\Finder\Finder; class FileSessionHandler implements SessionHandlerInterface { /** * The filesystem instance. * * @var \Illuminate\Filesystem\Fi...
196000
<?php namespace Illuminate\Session; use Illuminate\Support\Manager; /** * @mixin \Illuminate\Session\Store */ class SessionManager extends Manager { /** * Call a custom driver creator. * * @param string $driver * @return \Illuminate\Session\Store */ protected function callCustomC...