<?php
namespace App\Nova\Layouts\Resources;
use Acme\MultilangText\MultilangText;
use Acme\MultilangTextarea\MultilangTextarea;
use App\Models\Country;
use App\Models\Language;
use Laravel\Nova\Fields\Text;
use Whitecube\NovaFlexibleContent\Layouts\Layout;
class CropPurposeLayout extends Layout
{
/**
* The layout's unique identifier
*
* @var string
*/
protected $name = 'title';
/**
* The displayed title
*
* @var string
*/
protected $title = 'Content';
// protected $limit = 1;
/**
* Get the fields displayed by the layout.
*
* @return array
*/
public function fields()
{
$countries = Country::query()->get();
$languages = Language::query()->get();
$uploadLink = route('nova.fields.upload.image');
return [
MultilangTextarea::make(__('Description'), 'description')
->languages($languages)
->countries($countries)
->uploadLink($uploadLink)
->fullWidth(),
];
}
}