<?php
namespace App\Nova\Layouts\Pages;
use Acme\MultilangText\MultilangText;
use Acme\MultilangTextarea\MultilangTextarea;
use App\Models\Country;
use App\Models\Language;
use Illuminate\Support\Facades\Storage;
use Laravel\Nova\Fields\Heading;
use Laravel\Nova\Fields\Image;
use Laravel\Nova\Fields\Text;
use Oneduo\NovaFileManager\FileManager;
use Whitecube\NovaFlexibleContent\Layouts\Layout;
class ContactsLayout extends Layout
{
/**
* The layout's unique identifier
*
* @var string
*/
protected $name = 'title';
/**
* The displayed title
*
* @var string
*/
protected $title = 'Contact';
/**
* 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 [
FileManager::make(__('Icon'), 'icon')
->hideFromIndex(),
MultilangText::make('Title', 'title')->languages($languages)->countries($countries)->uploadLink($uploadLink)->fullWidth()
->hideFromIndex(),
MultilangText::make('Text', 'text')->languages($languages)->countries($countries)->uploadLink($uploadLink)->fullWidth()
->hideFromIndex(),
];
}
}