1. Go to this page and download the library: Download codeartlv/joona 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/ */
codeartlv / joona example snippets
class JoonaServiceProvider extends JoonaPanelProvider
{
protected function configure(Panel $panel): void
{
$panel
->addViteResources([
'resources/backend/scss/main.scss',
'resources/backend/js/main.js'
]
);
}
}
use Codeart\Joona\View\Components\Form\FormResponse;
// Inside your controller
$form = new FormResponse();
// Form submitted successfully
$form->setSuccess('Data saved!');
// Set error on field
$form->setError('Value to the URL
$form->setAction('close_popup', true); // Closes opened modal dialog
$form->setAction('reset', true); // Resets form to default state.
// Attaching additional data
$form->addData(['id' => 1]);
// Render form
return response()->json($form);
html
<x-button
caption="Submit"
type="submit"
role="primary"
icon="check"
:attr="['custom-attribute' => 'yes']" />
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.