public function types(Request $request)
    {
        if (!$resourceId = static::getResourceId($request)) {
            return [];
        }

        $type = optional($this->model()->whereId($resourceId)->first())->type;

        if (method_exists($type, 'types')) {
            return $type::types();
        };

        if (method_exists($type, 'sourceTypes')) {
            return $type::sourceTypes();
        };

        return [];
    }
public function types(Request $request)
    {
        if (!$resourceId = static::getResourceId($request)) {
            return [];
        }

        $type = optional($this->model()->whereId($resourceId)->first())->type;

        if (method_exists($type, 'types')) {
            return $type::types();
        };

        if (method_exists($type, 'sourceTypes')) {
            return $type::sourceTypes();
        };

        return [];
    }
public function types ( Request $ request ) { if ( ! $ resourceId = static :: getResourceId ( $ request ) ) { return [ ] ; } $ type = optional ( $ this -> model ( ) -> whereId ( $ resourceId ) -> first ( ) ) -> type ; if ( method_exists ( $ type , 'types' ) ) { return $ type :: types ( ) ; } ; if ( method_exists ( $ type , 'sourceTypes' ) ) { return $ type :: sourceTypes ( ) ; } ; return [ ] ; }
What type of repeater blocks should be made available to the resource.

@param Request $request
@return array
What type of repeater blocks should be made available to the resource .