GustavPHP

GustavPHP is a typed PHP framework for APIs and server-rendered web applications. Define endpoints with attributes, receive typed request data, and return PHP values as JSON or render them with native PHP views.
namespace App\Routes;
use GustavPHP\Gustav\Attribute\{Controller, Get};
#[Controller('/hello')]
final readonly class HelloController
{
/** @return array{message: string} */
#[Get]
public function show(): array
{
return ['message' => 'Hello, world!'];
}
}
Start with Installation to create and run a project, then build your first endpoint.