Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er) - Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link - Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest - Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen) - Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
52
vendor/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php
vendored
Executable file
52
vendor/laravel/framework/src/Illuminate/Routing/RouteSignatureParameters.php
vendored
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Routing;
|
||||
|
||||
use Illuminate\Support\Reflector;
|
||||
use Illuminate\Support\Str;
|
||||
use ReflectionFunction;
|
||||
use ReflectionMethod;
|
||||
|
||||
class RouteSignatureParameters
|
||||
{
|
||||
/**
|
||||
* Extract the route action's signature parameters.
|
||||
*
|
||||
* @param array $action
|
||||
* @param array $conditions
|
||||
* @return array
|
||||
*/
|
||||
public static function fromAction(array $action, $conditions = [])
|
||||
{
|
||||
$callback = RouteAction::containsSerializedClosure($action)
|
||||
? unserialize($action['uses'])->getClosure()
|
||||
: $action['uses'];
|
||||
|
||||
$parameters = is_string($callback)
|
||||
? static::fromClassMethodString($callback)
|
||||
: (new ReflectionFunction($callback))->getParameters();
|
||||
|
||||
return match (true) {
|
||||
! empty($conditions['subClass']) => array_filter($parameters, fn ($p) => Reflector::isParameterSubclassOf($p, $conditions['subClass'])),
|
||||
! empty($conditions['backedEnum']) => array_filter($parameters, fn ($p) => Reflector::isParameterBackedEnumWithStringBackingType($p)),
|
||||
default => $parameters,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parameters for the given class / method by string.
|
||||
*
|
||||
* @param string $uses
|
||||
* @return array
|
||||
*/
|
||||
protected static function fromClassMethodString($uses)
|
||||
{
|
||||
[$class, $method] = Str::parseCallback($uses);
|
||||
|
||||
if (! method_exists($class, $method) && Reflector::isCallable($class, $method)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return (new ReflectionMethod($class, $method))->getParameters();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user