PHP code example of genealabs / nova-file-upload-field

1. Go to this page and download the library: Download genealabs/nova-file-upload-field 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/ */

    

genealabs / nova-file-upload-field example snippets


 namespace App\Nova;

use GeneaLabs\NovaFileUploadField\FileUpload;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\Textarea;

class Image extends Resource
{
    public static $model = 'App\Image';
    public static $title = 'title';
    public static $search = [
        "id",
        "description",
        "title",
    ];

    public function fields(Request $request)
    {
        return [
            ID::make()
                ->sortable(),
            Text::make("Title", "title")
                ->sortable()
                ->rules("