PHP code example of reedware / nova-textwrap-field

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

    

reedware / nova-textwrap-field example snippets




namespace App\Nova;

use Reedware\NovaTextwrapField\TextWrap;

class MyResource extends TextFilter
{
    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request, $query, $value)
    {
        return [
            TextWrap::make('My Field', my_field')
        ];
    }
}