PHP code example of iammarjamal / inertiatrans
1. Go to this page and download the library: Download iammarjamal/inertiatrans 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/ */
iammarjamal / inertiatrans example snippets
bash
php artisan inertiaTrans:install
jsx
import { __, trans } from 'inertia-translations';
export default function Welcome() {
return (
<div>
<h1 className="text-3xl font-bold">
{ trans("app.HelloWorld") }
</h1>
<h1 className="text-3xl font-bold">
{ __("app.HelloWorld") }
</h1>
</div>
);
}
bash
php artisan optimize:clear