PHP code example of expdev07 / nova-slim-field

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

    

expdev07 / nova-slim-field example snippets


/**
 * Configure the path to the slim assets.
 */
'slim' => [
    'jquery' => public_path('/js/jquery.js'),
    'js' => public_path('/js/slim.js'),
    'css' => public_path('/css/slim.css'),
]

/**
 * Get the fields displayed by the resource.
 *
 * @param Request $request
 * @return array
 */
public function fields(Request $request): array
{
    return [
        Slim::make('Featured Image')->cropable(true)->ratio('1:1')->size('300,300'),
    ];
}

php artisan vendor:publish --provider="ExpDev07\NovaSlimField\SlimFieldServiceProvider" --tag="config"