PHP code example of awesome-nova / features

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

    

awesome-nova / features example snippets


class MyResource extends Resource {
    public static function additionalInformation(Request $request)
    {
        return [
            'components' => [
                'detail-header' => 'my-resource-detail-header',
                'detail-toolbar' => 'my-resource-detail-toolbar',
                'index-header' => 'my-resource-index-header',
                'index-toolbar' => 'my-resource-index-toolbar',
            ],
        ];
    }
}


public function fields(Request $request) {
    return [
        File::make('Upload')->keepOriginalName()
    ];
}