src/Resources/Resource.php
/**
     * Build an "index" query for the given resource.
     */
Build an "index" query for the given resource.
Build an " index " query for the given resource .
public static function indexQuery(NovaRequest $request, $query): Builder
    {
        if (empty($request->get('orderBy'))) {
            $query->getQuery()->orders = [];
            foreach (static::$displayInOrder as $order)
                $query->orderBy(reset($order), end($order));
        }
        return $query;
    }
public static function indexQuery ( NovaRequest $ request , $ query ) : Builder { if ( empty ( $ request -> get ( 'orderBy' ) ) ) { $ query -> getQuery ( ) -> orders = [ ] ; foreach ( static :: $ displayInOrder as $ order ) $ query -> orderBy ( reset ( $ order ) , end ( $ order ) ) ; } return $ query ; }
Build an "index" query for the given resource.
Build an " index " query for the given resource .