1. Go to this page and download the library: Download wangta69/laravel-fortune library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wangta69 / laravel-fortune example snippets
YourDomain/fortune/saju/{ymdhi}/{sl?}/{leap?}
YourDomain/fortune/saj/{ymdhi}/{sl?}/{leap?}
$saju = Saju::ymdhi(...)->create();
$sipsin = $saju->sipsin(); // withSaju가 자동으로 호출됨
// 1. 원국 십신 접근 (타입 힌팅으로 안전)
$monthSipsin_e = $sipsin->month->e; // '편관'
// 2. 지장간에 숨겨진 십신 보기
$zizanganSipsin = $sipsin->getZizanganSipsin();
$hiddenSipsin = $zizanganSipsin->day->정기; // 일지에 숨겨진 진짜 속마음
// 3. 올해 운(예: 甲辰년)과의 관계 보기
$unSipsin = $sipsin->getUnSipsin('甲', '辰');
// $unSipsin->h 는 '정인', $unSipsin->e 는 '상관'
// "올해는 새로운 공부(정인)를 시작하고 싶은 마음과, 기존의 틀을 깨고 싶은(상관) 마음이 충돌하는 한 해입니다." 와 같은 해석 가능
// 4. 십신 개수 요약 보기
$summary = $sipsin->getSipsinCountSummary(); // ['편재' => 2, '정관' => 2, ...]
..........
use Pondol\Fortune\Services\YukimService;
class MyController
{
private YukimService $yukimService;
public function __construct(YukimService $yukimService)
{
$this->yukimService = $yukimService;
}
}