Open 7nohe opened 1 year ago
Let's assume we have a PostsController like the following in a Laravel project:
class PostsController extends Controller { public function index() { $posts = Post::all(); return Inertia::render( 'Posts/Index', [ 'posts' => $posts ] ); } }
This code generates a props type called PostsIndexProps, which can be used as follows:
<script setup lang="ts"> import { PostsIndexProps } from '@/types/props'; const page = usePage<PostsIndexProps>() </script>
That would be great!
Let's assume we have a PostsController like the following in a Laravel project:
This code generates a props type called PostsIndexProps, which can be used as follows: