PHP code example of soluzione-software / nova-resource-table-footer

1. Go to this page and download the library: Download soluzione-software/nova-resource-table-footer 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/ */

    

soluzione-software / nova-resource-table-footer example snippets




namespace App\Nova;

use Illuminate\Database\Eloquent\Builder;
use Laravel\Nova\Http\Requests\NovaRequest;
use SoluzioneSoftware\NovaResourceTableFooter\Contracts\HasFooter;

class User extends Resource implements HasFooter {
    // ...
    
    public function getFooter(NovaRequest $request, Builder $query): array
    {
        return [ // <tfoot>
            [ // <tr>
                [ // <td> 
                    'attributes' => [ // <td ... v-bind="attributes">
                        'colspan' => 5,
                        //'rowspan' => 1,
                     ],
                    'content' => '<span>...</span>', // html content
                 ], // </td>
            ], // </tr>
        ]; // </tfoot>
    }
}