![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/orchestra/testbench-core/src/Attributes/ |
<?php namespace Orchestra\Testbench\Attributes; use Attribute; use Closure; use Orchestra\Testbench\Contracts\Attributes\Actionable as ActionableContract; #[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] final class DefineRoute implements ActionableContract { /** * Construct a new attribute. * * @param string $method */ public function __construct( public string $method ) { // } /** * Handle the attribute. * * @param \Illuminate\Foundation\Application $app * @param \Closure(string, array<int, mixed>):void $action */ public function handle($app, Closure $action): void { /** @var \Illuminate\Routing\Router $router */ $router = $app->make('router'); \call_user_func($action, $this->method, [$router]); } }