Eager load or lazy load on modals?

Sorry for the silly question. I have an Edit modal for a record on my table. I am using
$record->supplier
in multiple places (
supplier
being a relationship which gets the supplier modal for the table record ). Is a query being run each time to get the supplier info or is it eager loaded the once?

Thanks all. I am running
$record->supplier
maybe five times through the schema so I idealy I didnt want to be running a query five times for the same thing.

Example code usage:
TextInput::make('total')->prefix('£')->required()->numeric()
                        ->live()->debounce()
                        ->afterStateUpdated(fn (Set $set, Get $get, $state, $record) => self::totalsCalc($set, $get, $state, $record->supplier, 'total')),
Was this page helpful?