Skip to content

Commit

Permalink
[1.x] Add $request->inertia() IDE helper (#625)
Browse files Browse the repository at this point in the history
* Add `$request->inertia()` IDE helper

* Re-export IDE helper file
  • Loading branch information
ycs77 authored May 16, 2024
1 parent de6b005 commit 576fba4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/.gitignore export-ignore
/.github export-ignore
/.php-cs-fixer.dist.php export-ignore
/_ide_helpers.php export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/CHANGELOG.md export-ignore
Expand Down
27 changes: 27 additions & 0 deletions _ide_helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ class TestResponse
namespace Illuminate\Support\Facades {

/**
* @see \Inertia\ServiceProvider
*
* @method static bool inertia()
*/
class Request
{
//
}

/**
* @see \Inertia\ServiceProvider
*
* @method static self inertia(string $uri, string $component, array $props = [])
*/
class Route
Expand All @@ -41,9 +53,24 @@ class Route
}
}

namespace Illuminate\Http {

/**
* @see \Inertia\ServiceProvider
*
* @method bool inertia()
*/
class Request
{
//
}
}

namespace Illuminate\Routing {

/**
* @see \Inertia\ServiceProvider
*
* @method self inertia(string $uri, string $component, array $props = [])
*/
class Router
Expand Down

0 comments on commit 576fba4

Please sign in to comment.