PHP code example of kiritokatklian / nova-astrotranslatable
1. Go to this page and download the library: Download kiritokatklian/nova-astrotranslatable 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/ */
kiritokatklian / nova-astrotranslatable example snippets
// Any Nova field
Text::make('Name')
->rules('ield
Multiselect::make('Football teams')
->rules('n')
->translatable([
'en' => 'English',
'et' => 'Estonian',
]),
use Kiritokatklian\NovaAstrotranslatable\HandlesTranslatable;
class Product extends Resource
{
use HandlesTranslatable;
public function fields(Request $request)
{
return [
Text::make(__('Name'), 'name')
->sortable()
->translatable()
->rules(['max:255'])
->rulesFor('en', [
'