This is a proof of concept showing how it can be possible to connect a SvelteKit frontend to a PHP backend using remote functions.
bun install
bun run dev
export default defineConfig({
plugins: [
sveltekit(),
phpkit({ endpoint: 'http://localhost/path/to/php/index.php' })
]
});
Prefix your PHP function with query, form, or command to indicate its type. For example:- queryTodos
formCreateTodocommandDeleteTodoqueryTodoByIDcommandUpdateTodoThis is a POC, feel free to contribute to make it better.