Not sure to understand what you need.
If you want to fill this table with datas from the database, you probably need to create a database view.
On laravel 11 / nova 4 app I created a orders_report table, which I want to fill manually
from some laravel script with data based on orders of the site.
I added menu item as :
MenuSection::make('Reports', [
...
MenuItem::resource(OrdersReport::class),
]),
and resource declaration :
<?php
namespace App\Nova\Reports;
use App\Nova\Resource;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Http\Requests\NovaRequest;
class OrdersReport extends Resource
{
/**
* The model the resource corresponds to.
*
* @var class-string<\App\Models\OrderReport>
*/
public static $model = \App\Models\OrderReport::class;
...
In which way can I run laravel script(supposedly action class) to fill orders_report table before this resource is opened ?
Please or to participate in this conversation.