swytch framework
Hotfix: caching
Swytch 프레임 워크는 새롭고 신생하지만 강력한 프레임 워크로 API 엔드 포인트를 포함하여 응용 프로그램 논리에 HTML 인라인을 작성할 수 있습니다. HTML을 처리하고 HTML을 처리하고 이스케이프하기 위해 브라우저 사이드 헤비 리프팅 및 사용자 정의 스트리밍 HTML5 파서를 위해 HTMX 위에 구축되었습니다.
특징:
참고 : 현재 사전 제작 소프트웨어이며 생산 사용에는 권장되지 않습니다.
다음은 Swytch 프레임 워크를 사용하는 몇 가지 예제 앱입니다.
한 번에 라이브를 확인하십시오 .getswytch.com. 이것은 비밀 메시지 앱입니다.
이 앱은 비밀번호를 이메일로 보내서 간단한 인증 시스템을 제공합니다. Kubernetes Ingress 인증을 제공합니다.
#[ Bottledcode SwytchFramework Template Attributes Component( ' example ' )]
class ExampleComponent {
use Bottledcode SwytchFramework Template Traits RegularPHP;
use Bottledcode SwytchFramework Template Traits Htmx;
#[ Bottledcode SwytchFramework Router Attributes Route( Bottledcode SwytchFramework Router Method:: POST , ' /api/number ' )]
public function getNumber ( string $ name , string $ number ): int {
return $ this -> render ( $ name , random_int ( 0 , 100 ));
}
public function render ( string $ name , int $ number = null ): string {
$ this -> begin ();
?>
<div>
<h1>Hello, { <?= $ name ?> }</h1>
<form hx-post="/api/number">
<!-- CSRF protection is automatically added to forms -->
<input type='hidden' name='name' value={ <?= $ name ?> } />
<p>Here is a random number: { <?= $ number ?> }</p>
<button type="submit">Generate a new random number</button>
</form>
</div>
<?php
return $ this -> end ();
}
}