protected function includeByName( $name, $model )
    {

        $functionName = sprintf( 'include%s', ucfirst( $name ) );

        if ( ! method_exists( static::class, $functionName ) ) {
            throw new \Exception(sprintf( 'The function name "%s" does not exists on %s', $functionName, static::class ));
        }

        return $this->{$functionName}( $model );

    }
protected function includeByName( $name, $model )
    {

        $functionName = sprintf( 'include%s', ucfirst( $name ) );

        if ( ! method_exists( static::class, $functionName ) ) {
            throw new \Exception(sprintf( 'The function name "%s" does not exists on %s', $functionName, static::class ));
        }

        return $this->{$functionName}( $model );

    }
protected function includeByName ( $ name , $ model ) { $ functionName = sprintf ( 'include%s' , ucfirst ( $ name ) ) ; if ( ! method_exists ( static :: class , $ functionName ) ) { throw new \ Exception ( sprintf ( 'The function name "%s" does not exists on %s' , $ functionName , static :: class ) ) ; } return $ this -> { $ functionName } ( $ model ) ; }
Call the include function thats equal to the name

@return Array
Call the include function thats equal to the name