PHP code example of crayon / nova-language-management

1. Go to this page and download the library: Download crayon/nova-language-management 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/ */

    

crayon / nova-language-management example snippets


use Crayon\NovaLanguageEditor\NovaLanguageEditor;

/**
 * Get the tools that should be listed in the Nova sidebar.
 *
 * @return array
 */
public function tools()
{
    NovaLanguageEditor::make();
}

    NovaLanguageEditor::make()->canSee(fn($request) => $request->user()->isSuperAdmin()),
bash
php artisan vendor:publish --provider="Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider"
php artisan vendor:publish --tag="nova-translatable-config"
php artisan vendor:publish --provider="Bernhardh\NovaTranslationEditor\ToolServiceProvider"
bash
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations"
bash
php artisan migrate